Table with 100% width relative to parent div
Posted: Wed Jul 19, 2006 8:11 am
A work-around for this has to be documented somewhere, but I have been googling for half an hour and I'm stuck. Basically, I have a table inside a div:
And then I have this CSS:
I want the table to be 100% of the width of the div tag, not the browser window. In Firefox it's all well and dandy, but not in IE6. What do I do about it?
Code: Select all
<div>
<table>
<tr>
<td>Blah</td>
</tr>
</table>Code: Select all
div
{
margin-left: 21em;
margin-right: 9em;
}
table
{
width: 100%;
}