Forum Moderators: not2easy
<div style="border: solid 1px; width: 610px">
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FF0000" style="margin: 5px">
<tr>
<td>Table</td>
</tr>
</table>
<hr width="100%" style="margin: 5px" />
<h1 style="background-color: #999;">This is an H1</h1>
</div>
any ideas what's wrong?
<div style="border:solid 1px;padding:0 5px;width:600px">
<table style="width:100%;background:red">
<tr><td>Table
</table>
<hr>
<h1 style="background:#999;">This is an H1</h1>
</div>
Note that width is 600px instead of 610px, because the width of a box is:
margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right
<div style="border: solid 1px; width: 610px">
<div style="width: 600px; margin-left: 5px;">
<table width="100%" border="0" cellpadding="5" cellspacing="0" bgcolor="#FF0000" style="margin: 5px">
<tr>
<td>Table</td>
</tr>
</table>
</div>
<hr width="100%" style="margin: 5px" />
<h1 style="background-color: #999;">This is an H1</h1>
</div>