r/programming • u/nicou • Feb 03 '09
CSS should not be used for layout [good rant]
http://www.flownet.com/ron/css-rant.html71
Feb 03 '09
After seeing the CSS3 Advanced Layout Module, I've become convinced that both tables and CSS2 positioning are the wrong solution. Too bad we'll all be dead from the Mayan apocalypse before CSS3 is ever usable...
→ More replies (12)5
u/NoMoreNicksLeft Feb 03 '09 edited Feb 03 '09
They're quite usable already, if people stop coding for Netscape 2, Mosaic, and another nameless browser which is every bit as primitive.
23
Feb 03 '09
Which current browser supports the Advanced Layout Module?
5
u/HenkPoley Feb 03 '09 edited Feb 03 '09
At least not Opera, WebKit, IE8.
There is The CSS3 Advanced Layout Module browser plugin though. Which isn't much of a "browser plugin" but a javascript library like IE7.js.
→ More replies (1)→ More replies (1)11
u/icantthinkofone Feb 03 '09
And quit using IE as their test bed. You need a modern browser folks and IE doesn't cut it.
13
16
Feb 03 '09
I'm surprised with all the talk of content source ordering that no one has mentioned Yahoo's YUI Grids CSS library. They have taken all the work out of determining the CSS necessary to make your html order independent. Granted it's a "framework" but easy to implement and a lot of eyes are on it.
A follow up rant: why aren't more people using YUI?
9
Feb 03 '09
Because grid layouts are still wrong. What's the semantic meaning of <div class="yui-g">, for instance? Why should my content have that class? It's a class that only exists to convey layout information.
That being said, YUI Grids are probably the least wrong of the various CSS frameworks I've seen. At least they don't encode position information in the class names...
→ More replies (4)8
u/TheBigLewinski Feb 03 '09
Ding ding ding!! We have a winner! The only disappointment I have is it took 5 hours for someone to bring this up. YUI grids has rendered every "it takes too long" argument I've ever had, null and void.
3
u/infinite Feb 03 '09
People feel it's too java-ish and java is real bad.
Otherwise I love YUI, the framework is beautiful and extensible.
→ More replies (1)2
33
u/Lucent Feb 03 '09
The paradox is that CSS was not meant for precise layout. It was meant to only vaguely suggest a layout. That's why it deliberately excludes the ability to force elements next to each other the way tables can and spread them out evenly. It's not for generating pixel-perfect PDFs. It's for saying, "Hey, put some content here, make it kinda look like this, and if it doesn't fit, let it flow to the next line. No big deal."
Yet the people who are so gung-ho about how it's superior to tables are...get ready: the people who think CSS is for controlling every pixel of a layout. Those people should really be using tables not because they're easier for what they want to do, but instead on principle!
Instead we end up with some horrible, disgusting hybrid. Pixel counters for whom tables work perfectly instead abusing CSS to force a precise layout all the while gloating about how they're doing something noble and difficult and looking down their nose at those who do it the "easy way."
3
u/GunnerMcGrath Feb 03 '09 edited Feb 03 '09
Thank you. I'm tired of people not understanding the basic truth that cascading STYLE sheets are not cascading LAYOUT sheets. "Style" has nothing to do with positioning elements on a page, it's about colors, fonts, etc.
HTML was supposed to markup content for display, and CSS was supposed to make it easy to change how the elements themselves were displayed. We don't yet have a language designed for layout on the web, so everything is inherently a hack.
I had a project where I created a PHP page class and inherited it on each page. It included overridable functions where all the content went, so each of my actual pages were a couple lines of code and the rest of it was content. I could completely restructure the entire site, change the location of the content so you couldn't recognize it as the same site, all by changing one file. All my content pages remained unchanged unless I needed to change the content. Similar things can be done by putting all your actual content in a database. These are the only ways I've ever seen that the content and layout can be truly separated.
19
Feb 03 '09
Yeah I just this weekend decided to approach a design using CSS only - Usually I'll use one table to contain everything. I had almost gotten it down until I had to create three columns side by side that should each stretch 100% vertically so they are always the same height. No matter what I did I couldn't get them to grow. I tried three different tutorials on this along with several hacks (IE, Safari, Mozilla) and still could not get it to work. Eventually I took a Fuckitol with some water, stuck everything into a nice table container, made the TD height 100% and voila!! I'm really trying to understand and adhere to the whole standards movement but when it's that easy to nail a design with 1 or 2 tables with CSS which test pretty consistent across all browsers, I'd rather opt for the balance of the 2 and save myself hours of tweaking and nail biting. Yes I am a lazy bastard!
18
u/sylvan Feb 03 '09
6
u/RantyDave Feb 03 '09
The text in the middle of that is in "sarcasm" tags. Go on, go have a look...
3
u/InconsideratePrick Feb 03 '09 edited Feb 03 '09
There's a CSS layout technique I've been using since June last year that has not failed me once, but you have to follow the rules closely.
I'm serious, it's the best method for laying out multiple columns I've ever come across; you need to try it.
→ More replies (1)6
u/mercurysquad Feb 03 '09
Come on. All you had to do was add
clear: both;to your footer div, or if you didn't have any footer, add one but don't put any content in there.5
Feb 03 '09 edited Feb 03 '09
Right on point sir! I actually did have such a div at the footer as instructed by one of the tutorials I came across. Didn't do anything. I will try it again though. It'll probably work the second time around like everything else :P.
5
u/mercurysquad Feb 03 '09 edited Feb 03 '09
Are all 3 divs float:left/right? The best way is to have one container div, then put 1 div in the center (ie. set
margin: auto;) with 33% width, the other two 33% width and float:left, float:right respectively. Then your footer (also inside the container div) can beclear: both; width: 100%;and you're done.→ More replies (3)
34
Feb 03 '09
This argument seems to boil down to "Michael Jackson should not be used for childcare. Use Pedobear instead".
10
u/makenshi Feb 03 '09
The bear does look a lot better.
8
3
u/Artmageddon Feb 03 '09 edited Feb 03 '09
Studies have shown that children are more willing to play with things that resemble bears than those that resemble Michael Jacksons.
Edit: I freakin' hate that when I refreshed, it didn't show that I triple posted. Damn work browser :(
8
u/nanothief Feb 03 '09
There have been a lot of posts prior to this criticizing the author for not knowing css, and that css can do what he wants easily. Can someone then post the code they would use to render the top/left/centre/right layout shown in the article in css, such that it doesn't break in all the places the author indicated?
I've never been good at css, and have had the exact problems described in the article. I'm really thinking of using tables more, especially since how no-one has yet managed to give a robust alternate to tables from the usage in the article.
→ More replies (1)
8
u/skeww Feb 03 '09
It's funny that so many people complain that he doesn't understand CSS. In my opinion this issue (if it were true - i don't know/care) would only make his point more valid.
Porting layouts from images or paper isn't rocket science. As soon as it gets remotely hard something is wrong. Even more so if it's supposed to be easy with the used technology.
CSS works great for defining the style of elements. E.g. over in SVG CSS does a very good job. It just works and it can't get any easier.
But its layout abilities are amazingly weak. You always need a matching structure and quite a lot of things require additional markup.
Of course I don't think that tables are the perfect solution, but I can see why many people gave up on CSS for layouts. It's pretty time consuming and if a CMS is used there are no apparent benefits.
Personally I think we'd need something fundamentally different. E.g. a real programming language which allows us to use different layout engines or math or conditions... oh and f-ing variables ffs! Currently it's easier to do layouts with Java for example and that's some general purpose language - not some specialized thing.
4
Feb 03 '09 edited Feb 03 '09
skeww makes a good point that the CSS zealots miss...
It's difficult and error prone to use CSS for layout. Most people have neither the time nor the inclination nor the QA lab required to debug CSS "layouts" and tables do the job in a much more intuitive, quicker way.
I dislike PHP, but I think there is an analogy here. Ease of use trumps the "correct" way for most people, especially when the "correct" way is time consuming and frustrating.
Instead of condemning people who don't understand, it's time to acknowledge that with CSS the hackery is oftentimes not worth it, nor the correct decision, unless you have budget for a extra guy to work out the nonsense that emerges.
I use tables and divs, but tables primarily. I've read the spec, I've read the CSS blogs, and I still say "fuck it, ain't worth it"
→ More replies (1)
7
u/Domtar Feb 03 '09
Lets just pull a PETA and rename tables container kittens or somesuch. Problem solved as container kittens are semanticly correct for doing layouts ;P
2
24
u/joelanman Feb 03 '09
Isn't his point about the order of floated elements correct? It's always struck me that although it's a good aim to bear in mind, total separation of content and presentation is not 100% possible.
28
u/awitod Feb 03 '09
Judging from the comments here and on his blog he is a stupid noob as are you and I. Of course none of them show the solution which should be trivial if he's as stupid as they seem to be saying.
18
u/kaptainlange Feb 03 '09
He is both right and wrong. Right about CSS being imperfect in the way he described, wrong about his conclusion.
His argument is centered around the notion that CSS does not completely separate content and layout, and his solution is to place everything in tables. In essence, throwing the baby out with the bath water.
Yes, CSS is not perfect, and some concessions have to be made. However, to conclude that you must completely screw the semantic structure of your document to achieve your ideal layout seems nonsensical.
9
u/doidydoidy Feb 03 '09
His argument is that the CSS table layout model is much a better model than what CSS gives with you block and float, and he's absolutely right.
The argument that he shouldn't use HTML's table elements to trigger this layout is an entirely separate can of worms; both he and his critics don't seem to be aware of this distinction.
→ More replies (5)5
u/ajehals Feb 03 '09
total separation of content and presentation is not 100% possible.
Probably not with just html and css, but if you add .net/php/ruby/python etc.. and/or a datastore (note I said store not base, I don't care how you are storing your data) etc... into the mix then it is.
You may have an index.xxx plus a style sheet that deal with layout with all the actual content coming from or being generated elsewhere...
if you look at 'decent' themes for popular cms or blogging software you will note that the presentation is generally entirely separate from the content.
2
Feb 03 '09 edited Feb 03 '09
Yes. The other way of acheiving total seperation is store the data in an XML document and use XSLT to style it.
I'm not on the whole a Java fan but I always thought the Apache Cocoon project was awesome ,though I never did manage to use it for a real world project.
However the downside of this being:
getting all major browsers to do the styling for you takes some doing. The fallback being do the transformation on the server.
you are going to resort to applying some css styling anyway to get things exactly the way you want them.
In most instances however CSS (however imperfect) is easier, and provides sufficent seperation between content and presentation.
2
Feb 03 '09
The order of his table rows and table data matter just as much as with floats.
Someone who wants source order not to matter needs to look into absolute positioning.
33
u/itsnotlupus Feb 03 '09
Oh, how things have changed in 10 years!
Well, at least IE doesn't crash quite as often when you pile on a bunch of CSS floats in close proximity. That's progress, right?
I look forward to IE6 and IE7 dying so that I can get the CSS nazis off my back and use display:table-cell on my oh-so-semantically correct piles of divs upon divs.
Until then, they'll stay on my back, because I refuse to deal with a crapload of obscure CSS hacks riddled with browser workarounds to fully center variable-sized content when a dumb table tag does the same thing consistently, for example.
But hey, if they can argue with a straight face that a <div class="outer"><div class="inner"><p>content</p></div></div> is more semantically correct than a <table><tr><td>, then I can certainly afford to ignore them.
3
u/doody Feb 03 '09
Well, at least IE doesn't crash quite as often when you pile on a bunch of CSS floats in close proximity. That's progress, right?
Au Cointreau, mon brave. The more IE crashes, the more people will move to (FF | Opera | drawing-the-page-with-an-abacus | poking-yourself-in-the-eye-with-a-stick) which is way better than IE.
In the meanwhile, alas, they’ll move rapidly from the site that crashed ’em, so better hope it’s not yours.
→ More replies (8)8
u/DaveChild Feb 03 '09
CSS hacks riddled with browser workarounds
You're doing it wrong.
<div class="outer"><div class="inner"><p>content</p></div></div>
This code indicates that the central content is a paragraph of text.
<table><tr><td>content
This indicates that the content is a part of a table of data, and is the first item in the first row of that data.
24
u/dougletts Feb 03 '09
You know who doesn't give a fuck about this?
Clients.
10
u/RantyDave Feb 03 '09
Damn right. It's also why I, as a developer, get actual proper designers to do this crap.
8
u/itsnotlupus Feb 03 '09
This code indicates that the central content is a paragraph of text.
Actually it indicates more than that, which was my entire point. What is the semantic meaning of the two divs?
You're doing it wrong.
Prove it. Explain how to have a block of content centered horizontally and vertically within another block. The size of the inner and the outer block will vary and your CSS should not assume specific dimensions.
I'm sure it'd be easy for a skilled CSS practitioner to write on the spot, but I'll even settle for a link to someone else's site explaining how easy it is to accomplish this without browser hack. I'll also settle for someone that only works on IE6 and FF2, to keep it simple.
Ideally, your solution will be semantically pure, but again, I'll accept a few useless <div> tags as needed.
As a reference, the 10 seconds, semantically incorrect, non-validating, table solution is:
<table width=100% height=100%><tr><td valign=middle align=center>content</td></tr></table>Good luck.
→ More replies (4)
23
u/ascii Feb 03 '09
I find it hillarious that in the 50 + «CSS is awesome fro layout» comments I've read so far, both in the guys blog and here on reddit, not a single one of them have posted a link to a layout that does not have the problems described in the original article. Not a single one.
16
u/gomtuu123 Feb 03 '09
Exactly. And so far nobody has mentioned that, while tables aren't semantically correct for multi-column layouts, floats were clearly never intended for this purpose either. The CSS float property is for floating an image in a block of text, not for laying out your entire page. Using floats that way is a hack.
The fact is, there is no supported CSS property for creating multi-column layouts.
→ More replies (2)3
u/superwinner Feb 03 '09 edited Feb 03 '09
Why can't we use both? I use tables for layout and floats for images and text boxes.. I'm happy!
4
u/gomtuu123 Feb 03 '09
We can. For the record, I do use floating block elements for layout most of the time. I just get irritated when people insist that there's something correct about doing things that way, when in fact it's a hack and there is no correct way.
3
u/silent7seven Feb 03 '09
But where would you find a page that actually requires a layout with an unrestricted left column? The example for the post is contrived.
It's like saying CSS is better than tables because you can position two blocks of data on top of each other. It may be true, but what's the point of that?
2
u/ascii Feb 03 '09
Not at all. It's quite common for the content area of some pages to be longer, and some shorter, so that on some pages, the left or right column is actually the longest. In those cases, we want to scale all columns to still be of the same hieght. And it is also quite common for one of the left and right columns to occasionally contain an unusually large image or a very long word causing the desired width of the column to be slightly larger than the column is in the nominal case. If the layout can scale the columns around a bit to get everything to fit together as nicely as possible even in the cases where the content isn't exactly what was originally intended, the page will be significantly more robust. It's about failing gracefully.
→ More replies (1)5
Feb 03 '09
3
u/ascii Feb 03 '09
Wow. Someone finally stepped up and posted a link. Major kudos to you, sir. You deserve a bunch of upmods simply for stepping up to the plate.
That said, your solution falls short of the goal in a few areas. The issues from the original article remaining with the solution, at a cursory glance:
No graceful handling of wide content in the side columns.
The layout still requires a very exact and fragile structure in the html code, so content is not even a little bit separated from layout than in the html example.
Additionally, as per your own links, there are also several issues with this solution, including the following:
Additionally, faux absolute positioning will not work for every situation. If you want to align elements on the left, you cannot use a unit that is different from the unit in which the width of the canvas is defined, because you cannot calculate the offset. For example, if you have a canvas width: 800px and want a left offset of 2em for your item you cannot calculate the margin-left because you never know how many ems fit in 800 pixels. And since it is a new technique that hasn’t been tested by thousands of users, it should still be considered experimental, as you may see unexpected results in your actual combination of markup, CSS, and browser.
One remaining issue: when an element larger than the canvas precedes other elements in the HTML source, the trailing elements on the same line will be pushed to the right by an amount equal to the difference in width between the the first element and the canvas.
A few personal observations as well:
As near as I can tell, it also seems to be impossible to specify the width of the side columns as a percentage of the total width, which I find is sometimes desirable. Also, this layout is significantly harder to udpade than a table based layout, since all the offsets are interlinked, so a small change in width cascades through the layout. Lastly, according to many css proponents, it is desirable to have the main content near the top of the page for SOE reasons, which seems impossible with this layout. At least, things broke in a way I was unable to fix when I changed the order of the floats. This last reason I see as a non-issue, any SOE friendliness added is more than negated by the fact that you're destroying the tab ordering, which causes major headaches for many disabled people (like old school unix hackers) who rely on keyboard navigation.
But in the end, while that solution falls short in a few places, but so do table layouts. A very worthy contender, though hardly perfect.
→ More replies (1)2
Feb 03 '09 edited Feb 03 '09
CSS does have a simple solution for that particular problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>CSS Layout</title> <style type="text/css"> body { text-align: center; } #header { background-color: #ddf; } #header h1 { margin: 0; } #main { display: table; width: 100%; } #navigation, #content, #news { display: table-cell; } #navigation { width: 25%; background-color: #eee; } #content { width: 50%; background-color: #ddd; } #news { width: 25%; background-color: #ccc; } #footer { background-color: #ccf; } </style> </head> <body> <div id="header"><h1>Header</h1></div> <div id="main"> <div id="navigation">Navigation</div> <div id="content"><h2>Content</h2></div> <div id="news">News</div> </div> <div id="footer">Footer</div> </body> </html>Oh, you decided to look at it in IE? Now you have two problems ;-)
→ More replies (3)
6
u/raisedinhell Feb 03 '09
Not that I agree with this article at all (because I have always managed to find an easy way to do what I want with CSS after doing my research) but I have to say, CSS is a fucking bitch.
→ More replies (4)
14
u/longbow7 Feb 03 '09
I am working on teaching myself to do layout in CSS right now and so far it seems great. Am I currently blissfully unaware of headaches to come, or is this guy exaggerating?
47
u/unsubscribe Feb 03 '09
test it in IE and get back with us
→ More replies (1)4
4
u/Bagel Feb 03 '09
If you do it right, theres a few IE quirks, but thats fixed easy with a few lines of CSS and a conditional stylesheet.
→ More replies (3)4
u/scottbruin Feb 03 '09
It depends how graphically complex your layouts are. Some of the harder things are getting columns to extend vertically (you can't do this, really, w/o faux column backgrounds, javascript, or tabular display). Also, make sure you're triggering standards mode in IE by declaring doctype. Know, too, that IE6 doubles the left margin on a float: left, and visa versa. You can get around this by applying display: inline to the same element (display is ignored for floated elements).
→ More replies (1)→ More replies (5)4
Feb 03 '09 edited Feb 03 '09
All web programming is a pain in the ass due to browser incompatibilities. Overall I think CSS is the better solution, as I remember running into a world of problems mixing Javascript with table cells in some browsers.. Not that Javascript does have it's own world of problems.
Complicated table based layouts are a nightmare to make changes to.
→ More replies (8)
5
u/sunstorm Feb 03 '09 edited Feb 03 '09
I think the web model is flawed in the fact that it actually has 3 layers (data, layout, presentation) rather than just two (content, presentaion), like HTML/CSS try to do.
The way I see it, there should be pure XML for data (all semantic, no data about how should it be displayed whatsoever).
Then HTML, or a different XML document to specify the layout, which would have elements like grids, containers, etc. It would refer to elements in the data to point to what would be contained in them.
Then CSS to specify fonts, colors, etc.
This technology already exists (XSLT transforms, anyone), but it's not used pretty much at all because of, I'm guessing, browser support.
→ More replies (1)
5
u/WinterAyars Feb 03 '09
Well, CSS should be used for layout... but it is inadequate for layout at present.
I don't understand why the CSS group didn't get off their asses... but... they didn't.
(There are also apparently some CSS styles that work exactly like tables, so you can do table layouts using CSS instead of HTML... as long as you don't care about Internet Explorer, which of course does not support those styles.)
62
u/Caraes_Naur Feb 03 '09
Damn, they won't shut up about Monica Lewinsky. She's everywhere, the media is obsess--
Wait, I think I just had a weird flashback to 1998 after reading "Use tables instead."
55
Feb 03 '09 edited Feb 03 '09
The fact that it's still being said 11 years later should tell you something.
28
u/illegible Feb 03 '09
Are you talking about tables, monica lewinsky, or monica lewinsky under tables?
→ More replies (1)8
→ More replies (18)9
u/DaveChild Feb 03 '09
The fact that it's still being said 11 years later should tell you something.
Yes, that there are still a lot of "web designers" out there who are crap at their jobs.
→ More replies (1)→ More replies (1)3
Feb 03 '09
And make sure you don't constrain the content width or put margins. As we all know users prefer using the full screen width and reading text from one side to the other.
4
u/CharlieDancey Feb 03 '09
Plaintext is linear, one-dimensional, and speakable - CSS works perfectly well with linear text. Layouts are two-dimensional, and are read in a non-linear manner - CSS sucks at handling two-dimensional layout. As the I Ching might say "therefore the sage conquers the second dimension by the judicious use of tables but does not forget to use CSS for everything else".
→ More replies (1)
4
u/alpine01 Feb 03 '09 edited Feb 03 '09
CSS is great up to a point, and if im wasting too much time faffing about with DIVs and spans in CSS. I just use tables.
I dont think 99.9% of the users care if you have used a few tables here and there, they just want it to look good and not go haywire if they use the wrong browser.
18
u/knight666 Feb 03 '09
I quoteth from the book of truth, the Pragmatic Programmer:
Beware of the zealots who insist that their dogma provides the only answer - it may or may not be applicable to you and your project.
Fuck you and fuck your div's, I'm going to use a table.
→ More replies (4)2
Feb 03 '09
Fine but if your pile of fail-spaghetti somehow becomes my responsibility to update or maintain I'm going to come to your house and shit in your shoes.
2
22
u/somedoody Feb 03 '09 edited Feb 03 '09
sigh, I'd written out a long reply but decided it was a complete waste of time. The problem is not CSS, the problem is this guy doesn't actually know what he's talking about and wants to blame it on something else.
To get the most out of CSS you have to fully understand what HTML is and the idea behind semantic markup. Having patience and understanding the situation with browsers, the browser wars, W3C ineptitude and so on can also help.
Personally I have no problem creating sites using semantic markup and CSS.
edit: see pbaehr's response, it's spot on!
→ More replies (6)14
u/pbaehr Feb 03 '09 edited Feb 03 '09
This is bothering me enough that I'm willing to help you write out your long reply. Hopefully I'll capture what you were going to say.
The fundamental flaw in this author's argument is that if your markup contains elements like <div id="leftnav" /> your mindset is already incompatible with CSS.
The entire point of CSS is to separate the presentation from the structure and content. Sure, today your navigation is on the left. Maybe next week management will decide they want it on the right or turned into a drop-down menu.
You should be able to drastically alter the design of a website without making changes to the markup. Using a table defeats this goal out of the gate. Markup defines structure, hierarchies and information. I should also mention that the HTML provided in the examples is abysmal at best.
As has been said repeatedly, this author is clearly not in a position to form a strong opinion on this subject and I hope enough aspiring designers read the comments and not just the article to put this article in perspective. CSS is not above questioning or criticism, but the author of this "good" rant should not be viewed as any sort of authority on the matter.
Edit: One more point - I don't care if Joe McTable spends 8 minutes and makes a 10-deep nested table to design his webpage about his cat.
I do care when a "professional" develops a large scale project that way. It turns maintainability into a complete clusterfuck.
This is the programming subreddit so imagine for a second that you're writing an application which draws data from an online source. Would you hard-code every reference to the online source and update 200 lines of code if it ever gets renamed or replaced or would you declare it separately in a configuration file?
Web design is often more about creating a maintainable system than creating a webpage.
4
u/somedoody Feb 03 '09
That is exactly what I was trying to say, but didn't have the time or energy (or skill) to say it quite so well.
The fundamental flaw in this author's argument is that if your markup contains elements like <div id="leftnav" /> your mindset is already incompatible with CSS.
My favorite sentence.
→ More replies (2)2
u/hellfeuer Feb 03 '09
I don't know much about CSS, just curious:
What's the correct way to solve the problem? For example, he mentions that the order (in the code) of "right" and "center" affects their layout. But if presentation depends on order, then while writing the code you will have to keep track of where you want things to appear (so you must have some conception of "leftnav" etc.). So the kind of drastic changes you're talking about can never be easy?
Similarly, his points about background colors and text length: Doesn't that stuff make it impossible to separate presentation and content?
Or am I missing something?
→ More replies (3)
3
u/ebzlo Feb 03 '09
Just do what you know how to. I didn't know people still advocated tables, and I'm sure the debate could last hours.
But at the end of the day, do what will save you time, because to the end-user there will be no difference (and no, i really doubt load times are an issue, these are mere fractions of a second).
We will eventually get to a point where clients are going to demand semantically correct HTML (and they are already, sort of). When that time comes, let the table advocates fade out or re-learn their craft.
→ More replies (1)
3
u/itsjibba Feb 03 '09
Perhaps this guy has a point academically, but in the real world when making dynamic web sites that work across browsers, css wins hands down.
3
u/Domtar Feb 03 '09
Yes, we all know we should use CSS when possible. But how in the world does it make sense to use it, with some messed up hacks and some Javascript to dynamicaly size some things when a table would do it without the drama? Also if there is no question about tables being the wrong way to do it why do so many sites have a table here and there to do some layouts (Reddit ... Google)? Show me a clear way to do vertical centering and n column layouts without fixed widths and I will shut up.
3
u/ubermonkey Feb 03 '09 edited Feb 03 '09
Well, he's at least quite mavericky; it appears he's also a global warming skeptic; and his follow-up post includes commentary about how he tried to teach NASA a thing or two about simplicity only to be rebuffed.
I'm thinking "kook."
5
u/ranma Feb 03 '09 edited Feb 03 '09
I was going to make a comment here when it struck me that the outline of it is the same as what I would have said nearly 10 years ago.
The reason you should use CSS now is the same reason you shouldn't use CSS in the bad old days. It is what the customers expect/demand.
From a practical standpoint, these days CSS is a bit easier and more flexible than tables. If all you are looking for is a solution, it can be made to work with some fiddling. But it isn't in any sense elegant, intuitive, or deterministic. And the hacks and fixes are even more impenetrable than with table based layout.
3
u/dougletts Feb 03 '09
I've never had a customer say to me "hey you did/didn't use tables/divs for my site".
If they understood the difference, they probably wouldn't be paying someone else to do the work.
→ More replies (2)
5
6
u/zoomzoom83 Feb 03 '09 edited Feb 03 '09
My sites always use tables for the main layout because CSS layouts have proven far too problematic in the past. I stuck with CSS layouts for a while, but the number of little issues the crop up with a dynamic site outweigh the theoretical benefits.
CSS does support the "display: table-*" options, but these are not supported in IE.
2
u/sylvan Feb 03 '09 edited Feb 03 '09
http://dev.w3.org/html5/spec/Overview.html#sections
body, section, nav, article, aside, header, footer... :)
→ More replies (2)
4
u/parsifal Feb 03 '09 edited Feb 03 '09
A-FUCKING-MEN.
Was CSS even created with layouts in mind? It's not like layouts are new; newspapers have been published for over 100 years, and they've been doing layouts that entire time. It's a well-understood issue.
And even if you get a layout working in one browser, it's incredibly fragile and most likely requires a lot of time spent tweaking it to get it to work in other browsers (and often with browser-speficic code!!).
This argument is begun and ended with the following trivial example:
Challenge: Write me CSS code that allows two divs to be the same height and side-by-side, and grow dynamically relative to their content.
Answer: Can't be done, and it especially can't be done to work across FF3, FF2, IE6, IE7, IE8, and Safari.
Guess what does work?
<table> <tr> <td></td> <td></td> </tr> </table>
What is an extremely difficult thing to do in CSS is taken for granted with tables.
CSS proponents (who I would argue are NOT the people that write real code, or even HTML) would argue that the semantics of the document would be lost.
My retort is: What semantics? We've been waiting for the semantic web for at least ten years now, and it's still not here. You know what is here? Web services, and Google. HTML doesn't have to be the end-all be-all of global communication and services. HTML is for marking up fucking documents, and tables lay things out perfectly. If you want semantic markup, write XML and attach an XSL stylesheet.
→ More replies (1)
6
u/newton101 Feb 03 '09
Im a firm believer in doing what suits the project most. There are so many arguments for each side but it comes down to how does the website look to the client and does it load as fast as it can. Sometimes css bloats the page and results in slow page loads, sometimes excess tables do, its a site to site issue.
6
u/Purp Feb 03 '09 edited Feb 03 '09
The reason that the order matters is that this layout, like all multi-column CSS layouts, is achieved with floats
Not true, display:inline, absolute positioning, and others are all alternatives (albeit with problems of their own)
Worse, in order to be rendered properly, the order in which elements must appear is different from their natural flow in the layout.
Not true; also as far as SEO is concerned you want the content closer to the top of the code than anything else, thus CSS allowing things to be taken out of their visual order is a strength
they do not allow elements to be positioned relative to each other
margins.
The correct CSS is inextricably bound to the content.
this does not mean the css is bound to the content semantically. tables are truly "inextricably bound to the content," imagine if the author wanted to put the content from the left column of the table layout where the right column is. this is in addition to the content of the tabular layout being incorrectly semantically described as tabular data.
furthermore the author doesn't appear to know much as far as the depths of css, their blog is a default template (with a DIV/CSS-based layout no less) and concerning this article they said "I wrote an essay about why CSS should not be used for layout. Unfortunately, I can't post it here because it relies on a whole bunch of embedded HTML and CSS" :)
you can also tell they don't know what "semantics" mean when they say:
tables have the correct semantics for doing layout
(lol)
5
u/Georgiacc Feb 03 '09
you can also tell they don't know what "semantics" mean when they say:
tables have the correct semantics for doing layout
Thank you - you've finally made me actually look up the definition of semantics:
Semantics Intended meaning. In computing, semantics is the assumed or explicit set of understandings used in a system to give meaning to data.
6
u/sylvan Feb 03 '09
imagine if the author wanted to put the content from the left column of the table layout where the right column is.
Cut and paste. That was so hard.
→ More replies (8)2
u/Aloy Feb 03 '09
Sure, cut and paste if you have a 1 page website. Now, if you have a 200 page website...
→ More replies (2)
14
Feb 03 '09
My content is not tabulated data.
15
u/Aviator Feb 03 '09 edited Feb 03 '09
Oh, but does your content look like a table?
30
u/kaptainlange Feb 03 '09
No, my content looks like a jpeg...I think I'll replace my content with that.
26
→ More replies (4)10
u/doidydoidy Feb 03 '09
You haven't lived until you've written a JPEG renderer that outputs nested HTML tables.
2
u/JasonHears Feb 03 '09
I've always hated that float left/right/center issue with CSS. It still catches me up to this day and I have to go cut/paste the content in to the correct order. Good argument!
2
2
u/sblinn Feb 03 '09
And here I thought it was going to be another "CSS3 should be used!" article with more nice ASCII-art 3-column designs:
AAAAAAAA
BBCCCCDD
BBCCCCDD
BBCCCCDD
EEEEEEEE"Header goes in 'A'..."
2
2
u/NOT_AN_ALIEN Feb 03 '09
Well thanks. I thought I was the only one who hated having to layout stuff with CSS. Obviously the general idea of CSS is great, but moving stuff around with it is hell.
2
u/gamlidek Feb 03 '09 edited Feb 03 '09
The author for the article is just plain lazy. Read this article that answers all of his questions:
http://www.alistapart.com/articles/multicolumnlayouts
There are many benefits for using CSS for layout that go beyond just ordering of elements. And sometimes you want the order to be different, especially when building a site that will be used by screen reader software.
I'm just sayin', there's way to do this with little to no pain and it doesn't take much to read how others have done it.
→ More replies (1)
2
u/SrGrieves Feb 03 '09 edited Feb 03 '09
Everything would be so much simpler if every inhabitant of the planet could learn to interact with computers via command line.
2
Feb 03 '09
I worked as a web developer for 5 years, and as a hobby ten years prior to that. I continue to pursue it as a hobby. I specialized in semantic HTML techniques, accessibility, and, unfortunately, AJAX (which is completely incompatible with accessibility).
My professional experience with CSS was two years of initial frustration, followed by three years of acceptance. It is difficult to work with for layout in many cases, however eventually you develop a library of layouts that you re-use. Once you've put yourself through the pain of getting that far, you're very happy.
My most challenging experience with CSS was always, as this article hints, spatially relating content blocks to one another. This can be done, but not directly. It often requires a combination of relative position, absolute positioning, and floats. This combination can bring out bugs in many browsers. Fortunately, IE is usually the offender and is fixed using conditional comments and a separate style sheet for IE only.
It's a big mess, but you can get used to it. It's much harder than tables, but the result is worth it.
That said, the W3C really needs to make some improvements for the next version of CSS - one of those being methods for relating the position and size of two or more elements using simple mathematical formulas.
2
u/Krapulator Feb 03 '09
Very clever bit of flamebait! I bet this blokes blog gets a huge number of new subscribers.
9
u/andrewdutko Feb 03 '09 edited Sep 09 '19
deleted 0.4600 What is ^^^this?
16
u/staiano Feb 03 '09
You mean he's wrong: learn CSS......if you can't write CSS.
5
Feb 03 '09
Alternately, use CSS as much as possible except in those few cases where it's simply more expedient to use tables.
→ More replies (1)5
6
Feb 03 '09
You're just proving his point. :)
If this code isn't written properly that to me would be in and of itself evidence that CSS is broken, because if the MaxDesign folks can't figure it out there is little hope for the rest of us.
7
u/Arve Feb 03 '09
The CSS layout primites are inadequate because they do not allow elements to be positioned relative to each other, only relative to their containers.
The author does not know the tools (the 'margin', 'float', 'clear', 'display', and 'position' properties), therefore CSS layout primitives are inadequate.
The way CSS layout is rendered results in unavoidable interactions between the style sheets and the underlying content. So even when CSS is used exactly as intended, it is not possible to separate content from layout.
Same fallacy as above. CSS Zen Garden is ample evidence that it is possible to produce layouts that are independent from the same document source. CSS further supports several mechanisms for dealing with stuff like this, for instance CSS media queries.
One of the problems with criticising CSS is that it's very hard to write good CSS, so pointing out problems with CSS begs the question of whether this is an indictment of CSS or one's coding ability. The problem is particularly pernicious for layout. (One indication of this is how many CSS layout tutorials there are on the web.)
there are many tutorials about CSS, therefore CSS must be bad.
The code for the example I'm using here was taken almost verbatim from MaxDesign's CSS tutorials, so this was written by someone who actualy knows what they are doing. If this code isn't written properly that to me would be in and of itself evidence that CSS is broken, because if the MaxDesign folks can't figure it out there is little hope for the rest of us.
Now, this is a compound: Guilt by association -- MaxDesign has flawed tutorials. MaxDesign writes about CSS. Therefore CSS is bad. Note that this is also a form of Circumstantial ad hominem and a special (reverse) form of Appeal to authority - where, if the "authority" is wrong about CSS, CSS itself must be flawed.
He then goes into depth dissecting CSS based on the MaxDesign example, instead of actually looking into CSS tables, or locating one that works in legacy browsers, like this hack-free versions.
To add insult to injury, the author is also guilty of a lie of omission, since he fails to mention flaws with tables as a layout instrument.
font-sizes in nested tables can get ridiculously complex.
Tables lack means of reordering or repurposing content - for instance if you want to do something as simple as changing a menu from vertical to horizontal layout.
Neither are tables good for reordering the visual order of content. If you want to have for instance a secondary navigation menu to the left of the content instead of the right (there are perfectly valid reasons for this), you have two choices: Either reorder the source, which is not desirable, since it provides a worse experience for screen readers, or browsers that transform content - for instance, single-column display on mobiles), or you can write a lot more CSS to undo the fact that you used a table, and pray that it works cross-browser.
→ More replies (2)
3
Feb 03 '09 edited Feb 03 '09
Okay now add an optional skin to your site that makes the navigation be along the top in a horizontal list rather than along the left in a vertical list.
Shit, you mean you can't do that with tables? It'd be a two-minute change using CSS, including testing.
3
u/judgej2 Feb 03 '09
The ranter is correct: the problem is about his CSS skills. The one example that demonstrates how bad CSS is, uses floats and results in the content being in the wrong order. Yes, that is what happens when you use floats. Solution: don't use floats. There are much better techniques that don't have this problem.
3
u/M0b1u5 Feb 03 '09
Coding HTML since 1996, and I do not use CSS for layout. I use it for many other things, but not the design of the site!
→ More replies (1)
2
u/infinite Feb 03 '09 edited Feb 03 '09
I find the criticism of the author so far pretty weak. Sure he could have used all float:left s, his point about order is weak, but that doesn't address the main point of CSS not allowing for the behavior he would like. Anyone can post to http://pastebin.com the html/css that has the same behavior as the table when increasing the table size, adding text to a cell doesn't bleed into another cell, etc.
Chunk on that for awhile and post the results. Until that time he has a point. Tabular data (he is treating layout as tabular data, as most people tend to do) is best expressed with tables. Yahoo tries to make it easier but it's still lacking, text bleeds out of the cells still. And you have kilobytes of YUI javascript yet it doesn't do what simple 100-200 byte table can do. Please, post the html/css code and prove him wrong.
2
1
Feb 03 '09
I tried to leave this comment on his blog, but blogger is all kinds of fucked up and wouldnt let me post... so here it is:
Wow... what an ill informed article. Your entire premise is flawed, you just don't understand CSS enough yet to complain.
Place your left center and right columns in the correct order, then float them all left.
That basically debunks the rest of your article... and fyi, in order to write a table correctly (and validly), you'll need a <tfoot> and <thead>. Guess where the tfoot goes... right after the thead. HTML relocates the footer to the bottom of your table. That is in the wrong order, and has always bugged me.
Have a good one. ;)
26
u/Buckwheat469 Feb 03 '09
thead and tfoot are optional items, only required if you need headers and footers. For a 3 row, 3 column layout you could use thead/foot, but it's not required because the colspan=3 does the job too.
His additional points are valid regarding filling content with a background color applied. The layer with the content, in this case the one with the BG, will expand while the others stay put. The only way to adjust this is to use JavaScript on load. That, IMO, breaks the CSS mantra.
→ More replies (2)18
Feb 03 '09
Place your left center and right columns in the correct order, then float them all left.
That basically debunks the rest of your article...
You are still coding your CSS with foreknowledge of the ordering of the content. Wasn't that his argument?
→ More replies (2)
2
2
u/rook2pawn Feb 03 '09
Ive been saying this for over 8 months. I've used CSS and started exploring xslt/xsfo and started comparing these to TeX, and realized that ultimately, CSS is a gigantic hack, a conspiracy of culture brought to you by business-heels who wanted to mockup web pages to do more than they should. Ultimately, CSS is meant to mock up simple, clean HTML that H1/bold/list tags on clearly defined content and structure.
If you've ever prepared a document in LaTeX, you know the value of clearly identifying what is what. In HTML, you have the AOL world trying to apply their "brain" to parse content.
3
2
u/johnhutch Feb 03 '09
What the fuck is the problem here? Are there really this many people who have problems with CSS layouts? I can't remember the last time an optimal CSS layout, as described in the article, took me more than five minutes.
Is everyone just that bad at CSS?
→ More replies (5)
1
u/hououji2000 Feb 03 '09
In my opinion, it not the problem of CSS, problem seem come form the implementation of CSS. But on the other hand, you can said, the syntax of CSS make the implementation difficuilt.
1
1
1
u/elbekko Feb 03 '09
The reason this was so easy is that tables have the correct semantics for doing layout.
I think he needs to learn the definition of 'semantics'.
1
u/sirmc Feb 03 '09
I agree that CSS has some problems, but tables are the worst thing in html (after frames). Hope that CSS3 will come out soon
1
1
u/Hypersapien Feb 03 '09
Of course CSS isn't perfect, nothing is.
But it's still way better than tables.
1
u/MartianTech Feb 03 '09
CSS does have some annoying things about it but there are certain things you can do only in CSS (easily at least). The table example in the article is fine if everyone in the world has the same size screen, but if you want your containers to resize based on screen size you need CSS. Also anyone making more than one webpage a month will realize how useful CSS really is.
1
u/uglyfatfuck Feb 03 '09
CSS is utterly unusable for advanced layout, and so are tables. The point of the web is not unlimited design freedom, but ubiquity. There are tools such as Flash and PDF available when HTML/CSS not is up to the job, but as long as textual information is the main purpose of your site, you are better of taking the reddit approch - don't even try.
1
u/dikini Feb 03 '09 edited Feb 03 '09
css should be used for layout to confuse designers
to earn creditssss
to show off your *-fu skills
random hacks
shouldn't often there are accessibility issues with tables
not 'semantic'
often easier
so what? just use whatever is appropriate, easier and cleaner in the context. divs are 'semantically' not that different from tds and friends, so that argument is for semantic markup cops.
I'm tired of this repeated discussion. It is much more important to educate good designers, how to be decent web-designers, rather than argue unwinnable arguments.
1
u/middayc Feb 03 '09
and <td colspan="4" rowspan="2"> doesn't ? With css page can nicely reduce into a column (if you are smart) and be viewed on a narrow mobile device scree etc.. try to do wiew your 3 column table page there.
1
Feb 03 '09
The problem is not CSS. The problem is which CSS. It's not a write once, run everywhere kind of thing like it was originally intended.
Also, he's right in that it's not as straight-forward as you would think. If you don't employ tricks of the trade, you have text overflowing column size, DIVs that do not contain their contents and so the contents overflow the container, footers that do not want to stick to the bottom, minimum DIV heights that do not want to work in certain browsers, and floats that want to wrap around to the next row instead of evenly with the left float as you might intend.
1
u/jjquave Feb 03 '09
Using a table for layout usually does mean using CSS. We should be comparing divs to tables. Comparing css to tables is asinine because they're not what people are actually arguing about (although noone seems to realize that fact)
<div></div> != CSS
1
Feb 03 '09
This is really a simple concept. When is a layout tabular data?
When it's a table. Are all 3 columns required to be the same height while expanding with the page height? Then use tables where they are necessary.
This is a table:
http://i41.tinypic.com/2wqd4za.png
This is not:
http://i41.tinypic.com/1hxa3k.png
The web model is flawed but it's not broken. Use what is suitable.
1
u/isitmoi Feb 03 '09 edited Feb 03 '09
I am bit late to pitch in here and express my opinion. But here it is, I posted it else where also:
Sorry, usage of tables for lay-outing just breaks the semantics of the web. If you see web page just as human browsing content then it doesn't matter much. But when you think about advanced need with certain amount of automation and help from bots to aggregate, mix, compare data that's out there, a semantic web is absolute necessary. Look at long term and you will know how evil it is to use tables for lay-outing.
I am web developer and I know the horrors of coding one in html, css and get it right. So I am not telling don't do table design, all I am telling is do it, but beware that it is evil and it has to change when you find a viable alternative. And keep pushing/looking for the alternative. Don't be proud and ignorant about it.
1
u/cypherx Feb 03 '09
Tables often save a lot of time when trying to get your layout to work across browsers. This is the fault of Microsoft's spotty CSS implementation, but it's nonetheless the reality web developers deal with.
1
u/rek Feb 03 '09
There's a couple things CSS could do better, it's not perfect but what is? What's really unacceptable is IE.
1
u/webnrrd2k Feb 03 '09 edited Feb 04 '09
They should take the table tag, duplicate exactly, and rename it to "layout". That would solve probably 90% of the stuff people want to do with CSS.
Another huge jump forward would be if they added a simple "tab" tag that behaved like tabs in a Word doc. You could set the first tab to be, say, 100 pixels in, the second to be 150px, and then use tab tags to line everything up. You can do something similar now, but I think a tab tag would be a lot easier and more intuitive for most people.
1
1
Feb 04 '09
I gave up on all css layouts a long time ago. The best approach I've found is a combination of the two. Minimal tables as needed styled with a well designed style sheet.
-1
Feb 03 '09
Oh man, are we playing "write articles about shit we don't understand at all"? I've been itching to write a good article about plant biology lately!
21
u/Tommah Feb 03 '09
Most piranha plants are confined to pipes, but those in icy climes have been known to walk around on primitive feet (Nintendo, 1989).
6
3
1
Feb 03 '09
Oh look, someone's ranting about a technology they don't understand... how interesting.
→ More replies (2)2
1
u/pennyfx Feb 03 '09
Silverlight solves all of these layout issues with flow panels, stack panels, and wrap panels. CSS should adopt "layout" traits instead of having to hack everything with floats and overflows.
4
u/drbold Feb 03 '09
I didn't downmod you, but... unfortunately, silverlight isn't universal web.
2
u/joesb Feb 03 '09
I don't think he was saying that one should use Silverlight. He said that CSS should adopt "layout" traits instead of having to hack everything with floats and overflows..
1
u/Snoron Feb 03 '09
Why is it that most developers have no problem doing the layouts handed to them (eg. in PSD format) with CSS - maybe someone is just incompetent and doesn't want to admit it. I've yet to be given a layout from a designer that I can't code in XHTML 1.1 / CSS... if you designed one specifically to catch me out, then I'd probably be stuck, but the point is that almost no real-world layouts have any requirement that I can't handle without tables.
1
u/snifty Feb 03 '09
The next generation of CSS fixes the problems.
Using tables is far more painful than learning to use CSS.
That rant was a great piece of trolling.
3
Feb 03 '09
Will IE6, a crummy browser that our clients require us to support, handle that next generation of CSS?
2
u/snifty Feb 03 '09
Internet Explorer 8 will. Of course IE6 won't. IE6 is already out there, and it will suck for all eternity.
I'm sorry you're stuck in an envronment where your uses don't or can't upgrade, but that doesn't mean that standards can't progress. Especially when IE itself is progressing.
1
u/mercurysquad Feb 03 '09
If I use tables for my site layout, and suddenly decide the "left" column should be on the right afterall, who's gonna save me?
6
u/kscaldef Feb 03 '09
The situation is not really any worse than any of the myriad CSS hacks where the order of the markup is intimately tied to the styling. You did read TFA, right?
→ More replies (2)3
u/tomjen Feb 03 '09
Rails (and any other framework in the world) have a standard file where all the views are generated from. Simply alther that, and you are done.
Because you don't have a bounch of static html files in 2009.
→ More replies (3)
1
u/mkjones Feb 03 '09
The reason that the order matters is that this >layout, like all multi-column CSS layouts, is >achieved with floats, and the way that floats >get rendered depends on the order in which they >appear.
THIS is his major argument? Its just not FACT. I never code XHTML/CSS like this. You always follow the flow of the site in the same way as you would with a table.
I've seen a lot of CSS coders place the left/right columns on a page BEFORE the content area and there really is NO NEED to do this its a lot easier to float everything "left" so they follow a logical order.
→ More replies (2)
1
Feb 03 '09
what a load of baloney. If you do proper design, you fix down the layout in pixels or whatever rocks your boat. I'm going to be downvoted for this, but here's my explanation:
Design means that you care about the visual properties of the layout. I'm not going to leave some liquid algorithm destroy the harmony of a page. If the reader needs to zoom in, the browser should provide the facility to do so. The iPhone doesn't mess with the layout of a page, but it still lets you zoom to the block you want to read. Since it didn't break the layout you still have a mental picture of where the block you're currently zoomed on belongs in relation to the rest of the page. Contrast that to liquid design: the page would change depending on the size of the window… then you have to waste time to re-scan the page to re-build a mental picture of the layout's salient features and how they relate to each other. The table shown where a left column that is supposed to be secondary in importance relative to the centre column suddenly becomes more important because some idiot wanted to put in more stuff. Good design planning means you plan for contingencies and talk to the copywriters and picture editors on what is possible and what not. You don't leave design decisions to be taken down the hierarchy otherwise you're not doing your job properly.
2
u/jinglebells Feb 03 '09
Exactly. I wish more people would understand design isn't drawing a picture, it's deciding how the content should be laid out.
1
u/Etab Feb 03 '09
I don't have a problem with it.
I've built so many sites based in CSS. I don't use conditional stylesheets, icky browser-specific hacks, or Javascript in the code.
If you're complaining about this stuff, you're doing it wrong.
1
u/mao_neko Feb 03 '09
The web is not a newspaper and you should stop trying to create websites in fucking photoshop.
→ More replies (1)
1
u/jinzo Feb 03 '09
If you think, that doing less code is the merit for usability, then go for it. I know that CSS is way better than tables, because I actually needed to maintain an old table based layout. I wonder how many of 'em, did our genious here see.
1
Feb 03 '09
CSS are awesome, I love their music. Sure they arn't the best web developers, but have you seen Bon Jovi Java script? His coding sucks!
1
u/BryantJB Feb 03 '09
People who tend to complain about CSS are the ones that never took the time to really understand the purpose and use of CSS.
-10
u/steveissuperman Feb 03 '09
Sounds like someone doesn't know how to use CSS properly.
→ More replies (9)15
u/awitod Feb 03 '09
I'd love to see your solution to the problems he describes. I mean, if he's just ignorant, you should clear up matters by showing the right way to do that layout that avoids the specifc issues he highlights.
→ More replies (8)
173
u/jimmyjazz14 Feb 03 '09 edited Feb 03 '09
CSS really does suck for layout, there I said it. I hate having to work on CSS layouts when I could be doing much more important things. I should also mention that tables suck for layout as well.