views:

183

answers:

2

I'm developing a website (using asp.net by the way) and I'm having a problem with IE6.

When I use some icons near links, using background-image and padding-left on the links, the icons display nice on FF and Chrome but in IE6 they take a kind of "gray" background, and sometimes the flash strangely.

Any ideas? is there some CSS hack to solve this? Thanks everyone!

+8  A: 

Are they .png files? IE6 has issues with alpha transparency in .pngs. There is a javascript fix though.

Edit, to clarify - If IE6 sees a .png with alpha transparency (which is different than the transparency in .gifs) it freaks out and renders that part the light gray I believe you are seeing. The javascript fix applies a filter to all the .pngs in the page. However, this does not work on .pngs that have been set as backgrounds via css.

swilliams
+2  A: 

Be careful with the PNG fix in IE6 - it uses a DirectX filter and it's relatively slow. If you have a lot of images on a page (for instance an icon on each row of 25 in a table) it can slow the page down quite a bit.

We found that the only performant solution was to server up aliased GIFs to IE6 and PNGs to everyone else.

Ho hum, it's just yet another reason to hate IE6 and all who sail in her.

Keith
Very helpful advise, thanks
Pablo Fernandez
Trying to get good performance in IE 6 is a fruitless pursuit.
eyelidlessness
Yeah, but still a necessity when over 75% of our corporate clients still use it exclusively (sigh)
Keith