On Oct 31, 2006, at 5:44 AM, Barney Carroll wrote: > I can't really imagine this, but this is because I used to use tables > all the time. I can't imagine how they could be so frustrating > though - > and there is a lot of (respected) work around the net helping people > constrained to div-based layouts because it is so difficult and > complicated to create column behaviour in divs that people found > extremely simple with tables.
Disclaimer: Yes, I know Alex ruled off-topic, but this particular message centers around a practical css/table incompatibility that continues to rise up and bite people. The result of this incompatibility has led to my taking certain philosophical positions in design that are not the point of the message and that I will not directly expound upon. It's based on a browser bug in IE/Win that can be duplicated by the following code (the bug is longstanding in IE/Win, but I haven't tested for it in IE7, yet): <div style="margin-left:150px;"> <img src="doesn'tmatter.jpg" height="75" width="100" style="float:left;"> <table width="100%"> <tr><td>column 1</td><td>column 2</td></tr> </table> </div> This is a very skeletal version of a problem that has bitten me more than once. The usual cause is a CMS that insists on wrapping the elements it manages in tables, but it can stem from other sources, including having a real table that you want to have fill the width of the available area. The problem is that IE is lazy. It sees that the table should be 100% of the available area, and it sees that there is an object floated left, so without calculating to see whether the table will, in fact, fit in the available space (a rudimentary check of the above says, yes, it will fit with 50px to spare, as the image is fully contained in the margin and does not extend into the usable space of the div) IE decides to hold the table until after the image. Even though any debugging measure you might take (colored fills, borders, etc.) will show the table and the image do not overlap (and every other browser will show the table and the image side by side). The point here is that IE makes code that mixes layout tables and css problematic; if you're working in a mixed environment you need to check all your assumptions. This thread (coupled with yet another occurrence of the bug in a site I've recently started maintaining) brought this bug to mind again. Have Fun, Arlen ------------------------------ In God we trust, all others must supply data ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/