Weird IE7 bug

Thursday Jul 17 2008

I ran into a really weird IE6 / IE7 bug I had never seen before today. I figured I'd share it with you. It all started with an email I got from a Dark Matter Pro user. It said:

Using IE-7 browser, when I see my latest image (Rays of Hopes) it looks clean. But when I switch to the Light background, I see scratches on the image.

"SCRATCHES?????" I thought...

So I had a look in IE7 and I saw the following phenomena:

screenshot of the actual 'scratches'

He was right! There were indeed 'scratches' visible on the page. I was baffled for a while. First I tried to open the image and save it again in Photoshop. I even tried saving it in PNG format instead of JPG and uploaded the images to a test install. But the problem persisted no matter what I did to this image.

When I had a look with my workmate Ian Pouncey we found what the problem was. For the fade-in effect on Dark Matter Pro I'm using Dav Glass' YUI Effects. It lets the image fade in by looping through transparency from totally transparent to not transparent at all. For modern browsers this is done by going from opacity: 0; to opacity: 1;. For IE it uses filter: alpha(opacity=0); to filter: alpha(opacity=100);. Sounds fine to me! However, it turned out that this filter creates these 'scratches' on certain images. It looks like we're dealing with an 8bit transparent gif / png with some nasty transparent holes in it. However, it's a full colour jpeg / png without any !

When firing up the IE Developer toolbar, we found out that as soon as we took out the final filter: alpha(opacity=100); that was there after the effect had finished, the 'holes' disappeared.

The only workaround I can think of to tackle this problem so far is to set filter: none; in my after the effect has finished. This eliminates the ugly 'scratches' on the page but they're still visible while the fadein is running.

If any of you has a better solution that completely gets rid of this weird problem I'd love to hear about it!

Dark Matter Pro: a premium photoblog template.

Affiliate program available

bookmarking

Commentary

Join the discussion! Leave a comment through the comment form below!

Got something to add to this?

Feel free to leave a comment on this site. You can use Textile and Emoticons. Your email address is only used to show a gravatar. Please stay on-topic and use common decency. Spammers will be shot in front of a live studio audience.

If you plan on posting code, use pastebin please and post a URL to the code. The comment processing doesn't deal very well with code. Sorry for the inconvenience.

Human comment spammers: don't bother posting your crap here. Comments are moderated and I won't let any of your shit through.

Remember personal info?
Yes
No

Trackbacks

If you have an interesting related post on your own site you can leave a trackback. As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once.

 

  • Featured Links
RockySomewhere near the Orion NebulaBookalicio.usGolden Gate BridgeThames River BankJackie and mePimpin' it