rf1
06-23-2007, 04:54 PM
Hi, I'm having some problems with div widths on IE 6 and 7.
What I'm trying to do is have a div with absolute position cover the whole window horizontally, but this div is in a table cell which of course isn't covering the whole window horizontally.
...
<td width="100px">
<div id="floating" style="position:absolute; left:0px; top:0px; width:100%">
</div>
</td>
...
So when I do this and test it in Firefox, Safari, etc. it works fine, covers the whole window... but in IE it doesn't... my guess is that IE is taking 100% as a hundred percent of the width of the containing element (td in this case), not of the whole window as it should because of absolute positioning.
I tried placing the div outside the td element and it worked fine...
how can I work around this problem?
Thanks!
What I'm trying to do is have a div with absolute position cover the whole window horizontally, but this div is in a table cell which of course isn't covering the whole window horizontally.
...
<td width="100px">
<div id="floating" style="position:absolute; left:0px; top:0px; width:100%">
</div>
</td>
...
So when I do this and test it in Firefox, Safari, etc. it works fine, covers the whole window... but in IE it doesn't... my guess is that IE is taking 100% as a hundred percent of the width of the containing element (td in this case), not of the whole window as it should because of absolute positioning.
I tried placing the div outside the td element and it worked fine...
how can I work around this problem?
Thanks!