PNG images and IE
--

Anybody who has done any web development work will know that Internet Explorer can't really handle PNG images with transparency, making PNG all but useless for web development. The current project i am working on uses a tool tip like hover effect that just needed to be transparent, and the only way this could be done was to use a PNG image, and get IE to render it correctly. I found a solution on the web using the IE only filters, this is ok since its only IE that has this problem.

<font color=""#000000""><br></br><br></br>background-image:url('bg_list_light.png');<br></br>_background-image:none;<br></br>_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(<br></br>enabled=true,sizingMethod=scale,src='bg_list_light.png');<br></br></font><br></br>
The idea here is to use the _ prefix for the commands that we only want IE to see, then setting the background to nothing and using a filter to get the PNG to load as intended.

This solution works ok, there is another bug in IE that prevents links inside the box that uses the filter to work, then again, this can always be solved via onClick actions. With this in my tool box i now feel that using PNG for all my web design needs is plausible.

--
Carl Cedergren
2006-05-10 09:05

<< Wedding Gallery Updated >>