This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image Lightening

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way (without modifying an image) to have that image appear lighter than it actually is? Thanks.

Rob
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
filters - CSS:

.lighter{filter:alpha(opacity=90);-moz-opacity:90%}

That adds transparency to the image, IE has a bunch of other filters.
Eric
 
Jhun Hoon
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i have a problem againnnnnnnnn ...



with the following css entry :



The image got transparent allright in firefox/netscape, but doesnt work in IE 6 .. I wonder why ?
I think i've done it right with the filter:Alpha(opacity=20);

Plz helppppp
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE does not support [TYPE=IMAGE], if you remove that, it works.

Plus do you know that have the Gecko opacity higher than IE's level?

Eric
 
Jhun Hoon
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mr Eric,

Thanks alot for your information,
Your solution works !

But it seems that other input of other types who share the same style class got more transparant too. The readonly input text now contains transparent texts =))

I could just use different style for different type of inputs though ^_^, and that would do the job ..

Just want to make sure though, if IE really doesnt have the [TYPE=IMAGE] equivalent of netscape/firefox ..

Thanks again !
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE does not support that feature of CSS and is a bummer, but different classNames is easier to deal with.

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic