floating div problem in IE7
- by Onur
I'm trying to use a second background image with a floated div but it doesn't work in IE6 & 7
I'm aware that the floating div's is a pain in * in IE7 and lower versions but I really need to make it work.
here is the code I'm using
<body style="background-color:#FFFFFF; margin-top:0px; margin-right:0px;" topmargin="0" rightmargin="0" leftmargin="0">
<div id="bg2" style="float:right; top:0px; width:450px; height:151px; margin-right:0px; padding-right:0px; font-size:1px; overflow:visible; background-image:url(images/back2.jpg);"></div>
<center>
<div style="position:relative; top:0px; width:1050px; margin:0px; padding:0px; vertical-align:top; text-align:left;">
....(huge div container)...
I also tried to remove width attribute from the div which contains 2nd background image, then get the windows size and add the difference to the container div as left attribute with Jquery. It worked fine in all IE versions but this time not on Chrome
here is a print screen
any ideas please?