Ian Skinner wrote:
My goal is to have the div as wide as the table. I would presume
that the "body" is wide as the table in order to encompass it, so if
one declared the div to be 100%; it would be as wide as body and
thus the table. But that does not work, at least not in IE6.
This should work pretty well across browser-land:
<body>
<div style="display: table; _height: 0;_display: inline;">
<div style="margin: 2px; padding: 2px 10px; border: solid 1px
blue;">Some top of page stuff</div>
<table>
<tr>
<td style="margin: 2px; padding: 2px 10px; border: solid 1px red;">data</td>
<!-- repeated a few dozen times making a wide table
that requires horizontal scrolling. -->
</tr>
</table>
</div>
</body>
...exploiting 'display: table' to mimic 'hasLayout' on an outer container.
Tested in: Opera 8, Safari 1.2.4, Firefox 1.0 and IE6.
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/