wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Image Lightening Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Image Lightening" Watch "Image Lightening" New topic
Author

Image Lightening

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 826
Is there a way (without modifying an image) to have that image appear lighter than it actually is? Thanks.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Nov 19, 2001
Posts: 28
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Nov 19, 2001
Posts: 28
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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.
 
subject: Image Lightening