nonsensor:mike's blog

2/3 There goes another one

Every few months or so, someone comes along and tries to play at being very innovative by taking a contradictory position. Usually that's just contradictory to logic. This self-described "CSS rant" is one such case. Try on for size the argument that it's impossible to separate content from presentation, so we should just give up. The followup really doesn't do much better, it just goes after the equally idiotic CSS proponents who can't seem to articulate their arguments in better ways than "you're an idiot."
The reason this was so easy is that tables have the correct semantics for doing layout. CSS doesn't. When you do layout you want to be have things adjust their sizes and positions based on not only their containers but also on their siblings. When the leftnav content grows you want the center div to grow to compensate, and vice versa. Table cells do this naturally. CSS DIVs do it only under extreme duress, and only by making assumptions about (and thus becoming tightly bound to) their underlying content, which undermines the whole point of CSS.
I can't even begin to point out what's wrong with this. Tables don't have any "semantics for doing layout" - or maybe they do, I can't really figure out what that statement means. I do know that tables were not meant to describe layout. Floats were not meant for layout either, at least not exactly, but valuing one difficult hack over another by trotting out an over-simplified example that shows that Mr. Garrett has very little understanding of the technology (especially the box model)... not really helping his argument.

Earlier in the page, he states that CSS is dependent on content order. Not so, as I proved today on a project where Celly insisted on having something first in the source even though it appears on the right. While Garrett demonstrates tables' "superiority" in other aspects, what does he do with the wrong source order? Nothing, because tables can't help that.

My opinion is pretty firm on the subject for various reasons, but this should explain pretty well.
  1. I used to do things the table way.
  2. I now do things with CSS.
  3. My blood pressure is significantly lower these days.
Even simpler, I refute the people who say that "it's all hacks." To a tiny, tiny degree that is true. However. The basis for my opinion is this: I find it hard to believe that the language that contains such properties as "position" was not meant for layout.

Related Posts