Matt81
08-06-2007, 09:22 AM
Hi there.
I'm currently building a front-end and having a few problems. One is to do with the use of transparent .png images as backgrounds.
I have a div that has a 24bit transparent .png as a background image. This works fine in IE7 and Firefox, but obviously not in IE6, for which I have created an IE specific stylesheet and added style rules to remove this background and load in the image via the Alpha Image loader filter.
Firstly here is the code from my HTML
<link rel="stylesheet" type="text/css" media="all" href="css/modules.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/ie.css" />
Within the modules CSS stylesheet I have styled the div in which the image will act as a background as such:
div#main_image
{
background : url(../images/modules/Untitled-1.png) no-repeat top left;
height : 274px;
position : absolute;
left : -20px;
width : 332px;
}
Now in the IE stylesheet I have styled the div like such:
* html div#main_image
{
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/modules/Untitled-1.png', sizingMethod='crop');
background: none;
}
In my mind this should work, yet all I get is a blank div with no background image in IE6.
Any help resolving this matter would be greatly appreciated.
I'm currently building a front-end and having a few problems. One is to do with the use of transparent .png images as backgrounds.
I have a div that has a 24bit transparent .png as a background image. This works fine in IE7 and Firefox, but obviously not in IE6, for which I have created an IE specific stylesheet and added style rules to remove this background and load in the image via the Alpha Image loader filter.
Firstly here is the code from my HTML
<link rel="stylesheet" type="text/css" media="all" href="css/modules.css" />
<link rel="stylesheet" type="text/css" media="all" href="css/ie.css" />
Within the modules CSS stylesheet I have styled the div in which the image will act as a background as such:
div#main_image
{
background : url(../images/modules/Untitled-1.png) no-repeat top left;
height : 274px;
position : absolute;
left : -20px;
width : 332px;
}
Now in the IE stylesheet I have styled the div like such:
* html div#main_image
{
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/modules/Untitled-1.png', sizingMethod='crop');
background: none;
}
In my mind this should work, yet all I get is a blank div with no background image in IE6.
Any help resolving this matter would be greatly appreciated.