Keith Devens .com |
Sunday, October 12, 2008 | ![]() |
| Would that which we have achieved have been possible if Providence had not helped us? – Adolf Hitler (in a speech at Regensburg on June 6th, 1937) | ||
|
| ← Going to see X-Men | Behind on my e-mail → |

Simon Willison (http://simon.incutio.com/) wrote:
sparticus (http://www.iamsparticus.co.uk) wrote:
Even if CSS has its errors it doesn't mean we should go back to tables! You mention that it's not just the browsers that are stopping CSS from being properly implemented, but the fact that CSS has issues that are seriously flawed.
But, I'd like to put forward the point of view that CSS is only still flawed because of the browsers not treating it properly. If NN4 and IE5.0 and all the rest had supported CSS 1 & 2 properly, then there would be a lot less confusion over how exactly css should be displaying things. People would be able to then see exactly what css should do without having to decipher the w3 spec. Then the bugs would be more evident, and would be easier to fix. As it is, even if the W3 decide to change height: 100%; to something more sensible, Internet explorer won't catch up for a few years, and even when it does it'll still take most people a few more years to upgrade.
Whatever the issue is with css, you can be sure that msie can take a least some of the blame 
Keith (http://www.keithdevens.com/) wrote:
Even if CSS has its errors it doesn't mean we should go back to tables!
It's not an either/or choice. Use what works. My point is exactly that CSS doesn't work in every case.
But, I'd like to put forward the point of view that CSS is only still flawed because of the browsers not treating it properly.
Did you read my post? The spec is broken.
Yes, it'd be nice if all browsers implemented CSS identically even going back to NS4. But the spec is more important than any particular implementation. If the spec is broken, then all implementations will be broken even when they're correct.
Dan (http://www.bleedingego.co.uk/) wrote:
http://www.w3.org/TR/html401/struct/tables.html#h-11.2.1
I've never been great with reading the W3C specs but surely that shows that table does not actually support the height attribute? Therefore CSS hasn't actually broken anything, it's actually gone and added something, which just happens to not act the same way as height does in those browsers that support it outside of W3C standards?
Keith (http://www.keithdevens.com/) wrote:
Dan, you're right. There is no height attribute on tables. I just checked, and it does work if you use it, but it's not standard. I actually wondered about that when Steven referred to it, but I didn't question it because his main point still stood.
Therefore CSS hasn't actually broken anything, it's actually gone and added something
You're right, in that standard HTML doesn't provide a way to make an element fill a percentage, height-wise, of the page. And you're right that CSS has added a lot. But my point is that the spec is inconsistent, and in that sense "broken". It's broken further in that layouts we could do with tables, because a row would always be 100% of the height of the table (if there was only one row), we can't do anymore with table-less pages using just CSS for layout.
My premise all along has been that there's no technical limitation to making the height behave how we expect. I just tried a layout similar to what I tried to do in CSS, but with nested tables, and it came out the same way the CSS would have. So, it's totally possible that there is a technical limitation, and the spec writers actually got it right (they are very smart people after all), but I haven't heard an argument as to what the technical limitation is. Furthermore, when I was first researching this and was asking around in #mozillazine, people there thought it wasn't a technical limitation.
Dan (http://www.bleedingego.co.uk/) wrote:
Don't get me wrong, I completely agree that CSS is flawed. There are plenty of things that drive me nuts about it, most of them regarding positioning, its a very horizontal standard, shall we say :-)
I just wanted to willy wave the standards for the sake of it, I'll shush now.
anonymous wrote:
The differences between width and height may be inconsistent, but they are necessary.
Width and height don't work the same way for any normal document; they shouldn't in this case either.
Most (all?) western languages read left-to-right, up-to-down. There is a definable width to a page, no matter how much you type. Unless you want to get rid of word-wrapping, you should recognise that height is dynamic with the document stream, width is static, except in unusual circumstances.
Now, what would be useful is to define the initial viewport width.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.217s.
(Used 8 db queries)

It is true that this is one of the major limitations of CSS. As usual, there is a workaround which can get the background colour of those left and right hand side columns to extend to the bottom of the divs: Set a background image on the body tag which is a line of background colour as wide as the left hand column, then create a similar image as wide as the right hand column and set it as the background on a "container" div wrapped around the rest of the document. It works, with a bit of tweaking, but it means the width of both columns must be specified in pixels rather than a relative unit such as percentages or ems.
I agree, the CSS box model really needs to address this. You could try starting a thread on the www-style mailing list, which is where all such issues are meant to be publically discussed.