floating div problem in IE7
Posted
by
Onur
on Stack Overflow
See other posts from Stack Overflow
or by Onur
Published on 2010-12-26T21:14:54Z
Indexed on
2010/12/27
1:54 UTC
Read the original article
Hit count: 259
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
any ideas please?
© Stack Overflow or respective owner