Fixing Transparent Image in IE6

by Noman Muhammad

IE6 doesn't support transparent image. There are many ways to use transparent image in IE6. Here is a way that I use to show the transparent image in IE6 using CSS. CSS part for it is as bellows.


#header
{
background:url(logo.png) no-repeat;
height:109px;
width:507px;
}

*html #header
{
background-image:none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="logo.png");
}


this "*html #header" part is only for IE6 i.e only IE6 will recognize this portion. One drawback of using this is we have to use absolute url to the image (i.e if logo.png is in the images folder(not in the css folder) of the site we have to write absolute url to that image. like: http://www.mysitename.com/images/logo.png).
Another drawback is links (i.e <a></a>) somwtimes become unclickable and forms become unfocusable. To get rid of it we have use postion:relative for a tag. i.e

a
{
postion:relative;
}