Log in

View Full Version : Resolved opacity effect not working in IE



laertjansen
12-04-2008, 03:29 PM
Hello everyone.

I´m building a folio gallery and reading the article http://www.w3schools.com/Css/css_image_transparency.asp I decided to apply an oppacity effect on the squares but the problem is that, but as per usual, it is not working on IE.

My gallery is: http://www.laertjansen.com/version02/

I put the code inside a div..like this...could that be the problem? The article only talks about attaching the code to <img>...

<div class="project" border="0" style="opacity:0.5;filter:alpha(opacity=50)" onmouseover="this.style.opacity=1;this.filters.alp ha.opacity=100" onmouseout="this.style.opacity=0.5;this.filters.al pha.opacity=50"><a href="works/itcameoutofthesky.jpg" rel="lightbox[all]" title="Personal concept and illustration. I call it 'It came out of the sky' - October 2008"><img src="thumbs/it_cameoutof_thesky.jpg"/></a></div>

Thanks a lot in advance for any sort of help.

Snookerman
12-04-2008, 04:13 PM
You need to use filter instead of opacity in IE. The zoom is because filter doesn't work unless your element is positioned but zoom:1 takes care of that without needing any positioning.
So here is what the code should be:

style="opacity: 0.5; filter: alpha(opacity = 50); zoom:1;"
I see you have used filter in your post, I had only looked at your page and you didn't have that there (at least at the containers I looked at). So if you already have the filter you just need to add the zoom part.

laertjansen
12-04-2008, 05:10 PM
Hey! It´s working now! :) thank you very very much for the help!

Snookerman
12-11-2008, 02:36 PM
You're welcome! You can go to your first post, edit, go advanced and add the Resolved prefix to the thread.