I have been trying to convert my table-based layout into smaller CSS, and mostly I've been successful. My problem has been with tables with width=100% and the fluid resizing of the two or more td elements inside.
This snippet shows my attempt to convert two TDs into CSS, but still relies on tables to get the main content to have a margin since IE coughs when you use a width=100% inside a margin - it treats the width of the containing box as if the margins weren't there, where firefox doesn't. What also happens is that the two "cells" flow past each other into multiple lines rather than causing scrolling like a single TR would do.
This also doesn't cope with three, four or more cells.
Am I trying too hard to get rid of tables?
Any help greatly appreciated,
Mark Smith
This snippet shows my attempt to convert two TDs into CSS, but still relies on tables to get the main content to have a margin since IE coughs when you use a width=100% inside a margin - it treats the width of the containing box as if the margins weren't there, where firefox doesn't. What also happens is that the two "cells" flow past each other into multiple lines rather than causing scrolling like a single TR would do.
This also doesn't cope with three, four or more cells.
Am I trying too hard to get rid of tables?
Code:
<html>
<body>
<h3>a title</h3>
<table width=100%><tr><td width=50><table width=50></table></td><td>
<div style="float:left">
caption<br>
<br>
<select size=10>
<option>a list of options</option>
<option>that might be variable size</option>
</select>
</div>
<div style="float:right"><div style="float:right">
caption<br>
<br>
<select size=10>
<option>another list of options</option>
<option>that might be variable size</option>
</select>
</div></div>
</td><td width=50><table width=50></table></td></tr></table>
</body>
</html>
Any help greatly appreciated,
Mark Smith