First, read this. Then come back.
I’ll wait here.
…
…
Ok, good. Now, here’s why the article’s complete and total garbage.
On his first point:
The CSS layout primites are inadequate because they do not allow elements to be positioned relative to each other, only relative to their containers.
They don’t? What about floats… do they not effect direct siblings? Can you not change positioning? Maybe I’m missing something here, but we’ve got the ability to change element positioning relative to other elements as well as the container (or even display on the screen at all times (“floating” elements on the screen), or display anywhere on the page). Using the table method that Ron advocates only allows you to position relative to it’s sibling. A table cell, which spans 1-n rows. A table cell that requires you to restructure your HTML (or at least move your content) if you want to move a section from the left, to the right. Whereas I could just swap the float, changing a couple lines of CSS.
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.
Unavoidable interactions? Giving elements IDs (which is good practice anyway), classes, and a <link> tag? Is this worse than creating an immutable structure? Again, perhaps I’m missing something somewhere, but the liquidity of a <div> layout is far superior. It’s changable, it’s easier to get things where you want them to go, it’s less HTML markup gunking up your content. A nicely “divved” layout is cleaner, easier to modify. Yes, I have to add IDs and classes… but a semantic, descriptive markup is far easier to read anyway.
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.
Hard for who? And regardless of difficulty, it’s a bit strange to denounce an entire language (markup syntax?) because it’s “hard”. C# and Ruby and Python and baking and riding bicycles can be hard for beginners too.
Ron follows his CSS bashing up with a kluge of examples that do nothing except show he has no idea what he’s doing, and badly mangles examples, saying “look, I reversed it, and it ’sploded! css sux”.
But the point is they have to be fixed! The correct CSS is inextricably bound to the content. Smarter people than me have tied themselves into knots trying to figure out how to make a three-column CSS layout that doesn’t have these problems. To my knowledge, no one has succeeded. It may be possible.
To his knowledge, nobody’s suceeded? Funny, because several of my own websites use 3-column CSS layouts, without “these problems”. Because I understand how CSS works. Because I’m not afraid to get my hands a little dirty, and because I don’t base my knowledge on display-view of Dreamwaver.
All it comes down to is the ranting of a man who has no idea what he’s talking about. CSS is perfect for layouts. It’s hard, as he readily admits, but once you understand it’s semantics, understand when and how and what to apply, there’s nothing better.














#1 by gb on February 3, 2009 - 8:17 am
Quote
I understand where the original post was coming from. CSS can be difficult and it is not truly intuitive. It can be improved a lot and it will with time. You do make good points as well but I think the main thing to keep in mind is not to tag CSS vs Tables but rather what are the appropriate times to use each.
#2 by Jack Lawson on February 3, 2009 - 10:00 am
Quote
I agree; tables are great, for tabular data. I’m not saying to never use tables, but rather, to never use tables for designing anything you’ll have to maintain in the future.
#3 by florin on February 3, 2009 - 8:50 pm
Quote
Doing CSS layout should be as simple that a 12 year old could do it.
CSS for layout is trash because I have three children, mortgage, responsibilities, chores, friends and still more.
CSS for layout is trash because it cots too much to get it done as opposed to what it could’ve been.
CSS for layout should be followed buy a universal revolt. You think I’m such a fool as to waste my precious time in this short life to fix some hacks that a committee spewed out? Indeed, CSS for layout is the result of collective ignorance of what people’s lives is worth. Yes, when you steal my time, I take it personal.
Yes, I do have to display stuff in the browser. Thank you very much, I enjoy my job.
Go hack away at your leisure. You must be an adolescent who gets obsessed over some shadows on your page design.
Get a life. CSS for layout has become a personal issue.
#4 by florin on February 3, 2009 - 8:53 pm
Quote
Here’s the best illustration of CSS layout, taken from your twitter post:
“Finally home.. only took 2 hours for what normally takes 25 minutes.”
#5 by RawThinkTank on February 3, 2009 - 9:10 pm
Quote
If GWT uses CSS when it compiles Java to JS, i bet they can save lot of coding hassles and JS size. i mean they should focus on CSS with regard to the JS compiler, that means their API should be CSS centric.
#6 by Jack Lawson on February 3, 2009 - 11:07 pm
Quote
@florin
Indeed it appears to have become a personal issue. I’ll reiterate the point that if you know how to use CSS, it’s not hard. It doesn’t take up time. It doesn’t cost too much if you know how to utilize the tools you’re given. To somebody who doesn’t understand how to use the technology, tables make sense.
However, I believe that just because something’s hard, you shouldn’t give up on it. An accessible, liquid design, to me, is more important than churning out a design using tables. I learned this lesson the hard way recently; I decided to take a shortcut on a design I had been working on. Then, after it was all done, the designer made several changes to how the content boxes fit into each page. And, now I was back at square one. However, had I used CSS and done it the right way, it may have taken 50% longer, but that means I would have also saved time, not having to do it twice; it’s much easier to change CSS, once it’s finished.
If you never have to maintain the design.. sure, use tables. But that’s hardly the case, and it’s a slippery slope.
And I am obsessed about “the shadows on my page design”, because what I deliver to my client should be the best I can possibly do, and nothing less. I refuse to offer anything other than my best.
#7 by Taylor Gautier on February 4, 2009 - 1:22 am
Quote
You don’t get it. It shouldn’t be hard. That’s what is wrong with CSS for layout.
#8 by zalun on February 4, 2009 - 3:07 am
Quote
CSS is not hard. Believe me. Just read few old articles from A List Apart and everything comes clear. I love separating the content and design. It is simple. Certainly there are things I’d like to have (like
dd selector), but usually Javascript comes quite handy.
Don’t get me wrong – I came through the table design (I started in ‘96) I still use it for HTML emails. The moment you realise the power of CSS is when you start to use a changeable content. There are things which are simply impossible without using 3 or more nested tables – that looks horrible. In CSS it is just another logical DOM Element (like ul or div).
Try to read your table designed page in Fangs – you may feel like a blind person – table information is an important part content, div is layout.
Give it a try – build something simple, avoid hacks, test in Firefox with Firebug, check in IE/Safari evry half an hour. If it is something new it’ll not be simple from the beginning.
Shouw some courage people
#9 by philip on February 4, 2009 - 1:36 pm
Quote
CSS is not just hard. It is also inconsistent. Using it just because it is the *right* thing to do makes about as much sense as using a razor to trim eye lashes – that is, it is possible, but why try it when there are far easier ways of getting stuff done. This religious zeal for CSS makes no sense.
#10 by Moa on January 30, 2010 - 9:20 pm
Quote
CSS is good for certain types of layout (eg. web pages, like duh) but is terrible for traditional types of layout (eg. dynamic application type interfaces). That is why web applications (even the most sophisticated Google ones) still fall so far short of any complex application out there.
After wrestling with CSS to try and get my moderately complex GWT working right (the Java is easy, the CSS is horrid) I abandoned it and went to a WebStart application where I could use all the power of Swing’s layout managers (once you spend the hour required to master GridBagLayout you realise how poor CSS is in comparison). Sure I could get the CSS to work correctly and possibly layout correctly but the tool/debugging support (Firebug) is second rate compared to rich-client equivalents. IMHO CSS is ok if all you’re doing is simple stuff (which is why it’s defenders see no problems) but it (and it’s tool environment) just isn’t good enough to push webapps to the next level.