No replies
msteudel
Offline
newbie
Seattle
Last seen: 14 years 33 weeks ago
Seattle
Timezone: GMT+3
Joined: 2007-07-24
Posts: 3
Points: 0

I'm using the popular bgsleight.js to fix ie6 background transparency problems:

In this function:

function fnFixPng(obj) {
var bg = obj.currentStyle.backgroundImage;
var src = bg.substring(5,bg.length-2);

obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
obj.style.backgroundImage = "url(images/x.gif)";

switch( src)
{
case "http://domain.com/images/bkg_box_bottom.png":
obj.style.backgroundPosition = "bottom center";
break;
}
}

After it fixes a "background-position: bottom background transparent png" it loses the positioning, putting it back to the top. I tried adding a switch statement that looks for that particular image, and sets the background position, but it doesn't move the background image to the bottom. I put an alert in the case statement so I know if Ive gotten into that statement.

Any ideas?

The rest of the html page is included below for completeness and perhaps other ideas on how to do a sliding door with background pngs ...

Thanks, Mark

*{margin:0; padding:0;}

body{
background-image: url(images/background.jpg);
}

#main{
width: 800px;
margin: auto;
}

#top{
background-image: url(images/bkg_box_top.png);
background-repeat: no-repeat;
margin-top:-63px;
width: 780px;
margin-left:-8px;
position:relative;
}

#middle{
border: 8px solid #f0b310;
width:764px;
margin-top:54px;
background-color: white;
}

#bottom{
background-image: url(images/bkg_box_bottom.png);
background-repeat:no-repeat;
background-position:bottom;
min-height:200px;
height:auto !important;
height:200px;
margin-bottom:-57px;
padding: 25px;
position:relative;
}

Followed by general paragraph of whatever we need to direct with. Followed by general paragraph of whatever we need to direct with. Followed by general paragraph of whatever we need to direct with. Followed by general paragraph of whatever we need to direct with. Followed by general paragraph of whatever we need to direct with. Followed by general paragraph of whatever we need to direct with. Read our privacy policy.