CSS Sucks (for layout)

I'm often amazed by people who defend CSS as an amazing technology for layout. I get where they're coming from - I mean it is a pretty reasonable way to handle styles (font stuff, mainly), and it has a laudable goal - namely to separate content from the layout. But as a technology for marking up layout? It's about the lousiest thing I can think of. It's painful. it's a chore.

CSS3.0 is starting to address some of these issues (border layout handling, for example, is something that we should have had since the start - and by start, I mean since Netscape 1.0), but it still needs to be backwards compatible with the older CSS functionality, which sucks.

But don't take my word for it. John Nagle doesn't like them either. (And yes, that's right, that's John Nagle. As in Nagle Algorithm). Here's a post I found from him on this blog:

You’re absolutely right.With Dreamweaver 3 and tables, it wasn’t necessary to look at HTML to lay out a page. With Dreamweaver 8 and CSS, the page designer must understand CSS, HTML, and probably Javascript. That’s was a big step backwards.

The CSS system is just too programmer-oriented. And I’m a programmer. (Programmer as in MSCS from Stanford, the Nagle algorithm in TCP, inventor of ragdoll technology, real-time robot vehicle control, not programmer as in “writes some Perl”. And my first web site went up in 1995.) It’s not that CSS is hard; it’s that CSS is bad.

CSS is, simply, a badly designed layout system. Even the rather simple system in Tk which lays out dialog boxes and windows is better. Tk is a nested-box system, but both “pack” (like CSS “float”) and “grid” (like tables) layouts are available in the same system. This is enough to handle most cases. Which “float” and “clear” are not. Page layout is forced to fall back on absolute positioning far too often.

The clever way to do layout would have been with a constraint system. Each box has four edges and four corners, and it would be possible to bind corners and edges to create any desired relationship between boxes. This is something one could express easily in a click and drag graphical tool. Want three columns the same height? Tie their adjacent bottom corners together.

Want to fill the page? Tie the outside corners to a page edge. Ten minutes to explain to an artist. Advanced use would involve priorities on constraints, so if something had to give in “fluid design” as the page size or type size changed, you could pick what gave first. (This could be extended to allow curved boundaries, even splines, but that might be overdoing it.)

The browser would have to have a constraint engine to resolve all the constraints, but there are known solutions to that problem.

Too many people drank the Kool-Aid on CSS. It’s just not that good a technology.

...

The worst problem with DIV-based layout is that the layout system is too weak. There’s no form of “grid” layout. There’s no way to relate a DIV to anything but its predecessor, its parent, or an absolute position. The system is just too dumb. That’s why people have to stand on their head just to get three columns to work.Tables actually are a better designed layout system. Table layouts allow table cells which span multiple rows and columns. If all tables could do were simple grids of cells, the CSS approach might make sense, but tables are more general than that. And they’re well supported in Dreamweaver.

The fundamental limitations of DIV-based layour are obscured by an excessive number of attributes and the occasional use of Javascript when the attributes aren’t enough. But underneath, the fundamental approach is just too weak.

If CSS had a grid capability, it wouldn’t be so bad. But it doesn’t.

So there you have it. CSS sucks.

I'm thinking about an alternative solution for some of the problems... If I get time I'll post it up.

About the author

Simon Cooke is an occasional video game developer, ex-freelance journalist, screenwriter, film-maker, musician, and software engineer in Seattle, WA.

The views posted on this blog are his and his alone, and have no relation to anything he's working on, his employer, or anything else and are not an official statement of any kind by them (and barely even one by him most of the time).

Archived Wordpress comments
HeavyWave wrote on Wednesday, October 31, 2007:

Who the hell does serious html markup in the Dreamweaver?
Making 3 columns layout is very simple and straight forward.
He’s relaying on things in Desktop development, where you sure have gridbag and box layouts, but web is very different.
You have more than just several forms, you have a picture, that you’re trying to translate to browser. CSS is good with that.

Josh W wrote on Tuesday, April 1, 2008:

CSS does suck for layout. I cringe when I think of the time I’ve lost in my life trying to force CSS to do something I can do with a table in two minutes. What I really can’t stand is the holier-than-thou types (heavywave) telling everyone that CSS is good for everything. It’s not.
Why should I have to resort to ridiculous hacks like making all my horizontal tabs ordered lists and then forcing them into place with bizarre positioning rules? Just use a table and bang you’re done instantly and it will look the SAME in all browsers and it will scale when the font size changes.

You can even break the csszengarden pages just by taking out the content. If these layouts require that a certain amount of space be taken up by ‘content’ then they break when the content is small. That’s BS.

Here’s my example:

http://www.insofar.com/css/x.html

All I did was take a layout from csszengarden and remove the P tags. Notice how the layout is jacked?
If this is supposed to be the final solution to CSS layout then I rest my case.

Message to heavywave:
Get off your high-horse. Go back to tables.

Anonymous wrote on Friday, May 9, 2008:

I think using CSS instead of HTML tables to make layouts is a bad idea. CSS has NOT made outlays easier to code. In fact, there are so many hacks to make it workable when a few table tags can do the job. Web designers should stick with tables to design layouts because tables are very intuitive and it works EVERYTIME on ALL browsers and it scales MUCH better. Additionally, it squeezes well on mobile devices - all the data cells are stacked nicely. Try that with CSS on mobile devices and you’ll find plenty of weird rendering.. Sidekick for an example.

If you have too many nested tables, then don’t blame on HTML table technology, blame on incompetent designers. I use tables sparingly. I use the main table as a way to control the major layouts. The smaller parts should be done with CSS.

Anonymous wrote on Thursday, June 26, 2008:

I read several books, did loads of experiments, tried it on lots of projects … all I can say. If you use CSS for layout you will burn in hell a lot sooner than you expected.

Max wrote on Monday, June 30, 2008:

Simon,
I totally agree with you. CSS is awful for layouts. I’m not sure why people defend it so much. Instead of helping foster technological development, they are keeping it behind, not realizing CSS is a poor technology.

Matt wrote on Monday, July 7, 2008:

Wow, what a bunch of uneducated idiots we have here. I’m only 13 and I can understand Css perfectly well, and do awesomely awesome layouts with it. Maybe if you took the time to actually read a book and learn some Css, you would have some better results. Tables suck, I just love editing my page content with a bunch of “tr” and “td” tags in my way. Check it out. www.mattegan.net

Simon Cooke wrote on Monday, July 14, 2008:

I applaud your enthusiasm, Matt, but I wouldn’t describe Nagle as an “uneducated idiot” - or myself.

Sure, you can work around the issues with CSS, but for any kind of complex layout, it starts getting very hairy very quickly.

Any time you need to hack things by setting negative margins, etc, etc, to get the results you want, there’s something wrong with the underlying architecture. Sure, tables aren’t a panacea, but they’re conceptually much easier to digest, and a lot less hacky.

It should be possible - in just a few lines - to describe a “block” on the page, with a header, footer, border made up of corner pieces and side/top pieces, etc. And yep, you can do it, but it starts getting very complicated very quickly for no good reason.

The system needs an overhaul - to be honest, it should be split in 3; style, layout and content.

Dilantha wrote on Thursday, July 17, 2008:

I agree with you too Matt!!

I do not agree with the guys who say CSS sucks.. if you know it well.. and ofcourse if you have creative mind..

you will alwais know how to handle it..

mostly Developers dont like it becase they dont have a creative mind to put the CSS property where and how.

and the just mess it up and screaming that browser support is a shit.

Check this out..
www.cssremix.com


even this blogger is done by CSS.. :-))

and also if there is no CSS.. using google for web sites will be not gonna easy like you do now guys…


Best Regards!
Dilantha.

Jedi wrote on Wednesday, July 23, 2008:

Wow, and I thought I was the only one seriously underwhelmed with CSS’ layout abilities…

One thing that I have seen absent from the CSS zealot camp is a serious discussion about Content Management Systems. The sites I develop are very complex (social networking, forums, galleries, etc.) and cannot be done with simple markup. They require a CMS. All serious application frameworks are back-ended by databases. And a database consists of… (drumroll inserted)… tables.

Zen Garden, CSS Beauty, et al, focus primarily on simple text generated sites where there is no separation of tags from content. With a CMS, as programmers and such well know, the database holds the information that is then pulled into the current layout.

So, your design had damned well better be able to hold up without a bunch of populated P-tags or it cannot work with Joomla, Drupal, Website Baker, Word Press… which are all database-driven.

Funny, those arguing against tables are often people who have never worked seriously with CMS - which are driven by tables (and therefore IMHO tables are far better suited for this primary reason to work with CMS-based data than pure div tags).

CSS is great - for enforcing consistent font colors, typeface, etc. However, at its core (at least not CSS 2 and earlier) it doesn’t support page layout and macrostructure predictably cross-browser, and definitely on its own cannot handle the very complex data requirements of sophisticated sites (which CMS tools were developed to address).

Tables for macrostructure, CSS for fine-tuning the appearance, is the only way to go if you are designing a seriously high-level site (and not just a one-man blog with a bunch of text).

Anonymous wrote on Thursday, September 4, 2008:

If you use CSS properly, you will only run into issues with older browsers and/or Internet Explorer. If you force 10 pounds into CSS’s 5 pound sack, of course you’ll run into issues.

In fact, it’s pure BS to claim that tables are “easier”; once the basic layout is done you still have to worry about getting borders, spacing and other things consistent; and guess what you’ll use to do that? That’s right, CSS.

In addition, some of us actually care to support more than just the top few desktop browsers, where table support becomes just as murky as CSS support (if not more-so). Not to mention that when using tables, you are essentially forcing the user to view your content in one way: your way. Your non-desktop users will thank you.

Stop whining and do your jobs properly - learn how to use your tools. CSS can’t do it all, but neither can tables. Anyone who claims either can is wasting everyone’s time and making a fool of themselves.

Anonymous wrote on Tuesday, September 9, 2008:

#browsers-suck
{ display:inline-block }
#browsers-suck
{ displlay: block }

if seinfeld and friend's OS browser monopoly could keep up with the other browsers, we'd already be sitting on CSS 3 and this discussion wouldn't exist.

CMS has nothing to do with rendering tech to previous poster talking about database tables as if that was supposed to make sense with regards to <table>

Nagle is missing the mark as to why web rendering technology is lagging.

It's Microsoft's fault.

Anonymous wrote on Wednesday, October 8, 2008:

Well, this discussion rapidly devolved into four predictable geek arguments:

1) CSS sucks.

2) No, it doesn’t, you suck at using it.

3) No, browsers suck for not supporting it.

4) It’s Microsoft’s fault.

I am inclined to go with number 4, because were it not for Microsoft, we might still be productive citizens engaged in doing tangible work instead of a bunch of back room trolls bickering over why the damn computer isn’t doing what its supposed to this time.

anzaan wrote on Thursday, November 20, 2008:

I was just wondering, if HTML table was repackaged with absolutely no changes to any of its markup structure and behaviour and called grid and renamed tr,td,th too, would all the CSS-P fanboys use it??


grid
row
cell “Grid Glory”
/cell
/row”
/grid

To me its utter nonsense to not use a feature just because of semantic concerns and feeble arguments of SEO, accessibility etc.

The thing that really pisses me off though is the fact that as soon as someone raises concern about CSS/DIV based designs, all the CSS fanboys gang up and point their fingers and tell people that the reason they have problem with CSS/DIV based layout is because they are just plain ass dumb.

These bright new fanboys are pretty fanatic and everywhere I read, their arguments are just the same. Standard arguments, boxed arguments.


And they talk about the amount of code in the markup that makes table-based layout horrible to maintain not to mention the bandwidth penalty.

As if the amount of css hack that has to be conjured to do simple layouts doesn’t need maintenance and as if it loads by magic on the browser and bandwith issue necomes non-issue….


CSS /DIV based layout is counter-intutive to say the least. Who starts thinking in terms of float and clear when designing anyway??
If I want to add a new element to the a layout, I not only have to think about the size of the element but I ahve to make damn sure that the rest of the page doesn’t break by a mere addition of an element in a page. Which forces me to look at the whole design in terms of pixels, margins and paddings to add be able to add
a new element to a layout item. And that doesn’t prevent content/elements bleeding off the layout container.

And how about overlap problems??
I can break the best laid out CSS site by merely adding one more element to it……

CSS has merely opened a new job market and allowed people to make loads of money out of it. And the fanboys of CSS/DIV layout guard their self-interest with great zealot beacuase without CSS they will be out of jobs. I mean, who’s going to write a page full of CSS hack to give us merely a 3-column fluid layout with column-size constraints. And then they write one more page full of CSS hacks to prevent the content from bleeding out of their containers, with partial success.

Web-development has taken a great leap backward as a result of the push to use CSS/DIV/SPAN for layouts.
Because we spend most of the time not in designing pages but in applying hacks to make them look devent on most browsers.

If the fanboys close their eyes for one minute and forget everything bad that had been hammered into their head about tables and think of it as a grid, u’ll be damn surprised how intuitive it is to design in terms of grids. All decent desktop GUI toolkit provide grid-based layout which allows us to apply constraint to layout grid-elements in relation to other grid elements and so on.

Why?

The fanboys might argue that the GUI toolkit designers were mere dumb people who still hold on to the grid-based layout of last century and blah blab and some more blah.

And when the fanboys run out of ammunition, they fallback to blaming browsers and declare its the fault of browsers and nothing else.
And meanwhile they bleed to death trying to make a simple layout work in most browsers with tons of css hacks which still doesn’t quite do the job. why?

CSS is ill-equipped to handle layouts…..The language or pseudo-language of CSS was designed by people who have no knack for Designs, if they did, the language would have been more intuitive than this terrible piece of work. I come from a programming background and I love beautiful designs and I like to pretend I can create cool designs and sites. For me CSS/DIV layout makes no sense from either a programmer’s prespective or a designer’s.

From a programmer’s perspective I like parameter driven development to simplify things, and from a designers perspective, I’d hate to have to hand-code the whole friggin page design and have to come up with countless hacks to overcome both CSS and browser shortcomings.

CSS sucks so bad that even though billions of people use the internet everyday, yet no decent visual designing tool has come out so far. The one decent WYSWYG editor Dreamweaver fails miserably when designing layouts in CSS.
Where’s the forward mobility promised by this new technology??

Anonymous wrote on Thursday, February 12, 2009:

I wouldn't say CSS sucks, period. It's great for styling, but not so much for layout. I've done dozens of websites and a few as pure CSS because of customer requirements.(They were convinced it was the ONLY way to do a web site. But hey, they paid the invoice.) I always end up with css hacks to be cross-browser compatible. And it always takes me longer for layout.

I generally use tables as a the skeleton of the layout and sprinkle in div's and other css to fine tune anything. No Holy Hack's, if condition - hackery -endif, IE spoofing stuff e.g. html>body, etc, etc ..

Much more forward compatible proof this way, I don't have to redo/add/delete all those css browser hacks. Too much can break in future browsers if you you are browser and version sniffing to obtain consistent cross browser layout.

Anonymous wrote on Thursday, February 12, 2009:

@Matt LMAO@you one of the sites you did is blocked by Google, 98 exploits and counting LMFAO. Who’s the uneducated idiot now….drum roll MATT bwahahahahah

Don’t take it too hard. It happens to the worst of us. Now go play WOW :)

xlq wrote on Thursday, March 26, 2009:

All the nice-looking CSS-based designs I’ve seen (eg. Matt’s www.mattegan.net) are mostly or wholly fixed-width. CSS is just incapable of laying out more than one column (eg. a sidebar, or two equal columns etc.) itself. That’s why CSS-based designs are fixed-width - because the person writing the CSS must do the layout, because CSS is incapable.

Anonymous wrote on Thursday, August 20, 2009:

Yep, my head about exploded when I got acquainted with this widely used “solution” (referenced in Drupal core, and a top google search) for '“Clearing”, 21st Century Style'


.clearfix:after {
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;
}


So, Just to clear contents vertically from a float, I have to add a hidden period using styling? Styling actually can affect the DOM? Are you frigging serious???

Oh, wait, no…. this is a “pseudo” class, so it's affecting the DOM, but not really affecting the DOM. So it doesn't show up in Firebug, the best CSS debugger out there, so you will have no idea what the hell is happening should you know about this barbaric kludge.

AND THIS IS A 21'ST CENTURY ADVANCEMENT?

And sorry, Microsoft, as Neanderthal as they are, was NOT responsible for this. How can anybody defend this crap!?

It's mediocre at best even for basic uses like…. styling text! I can't even define a color variable in one place so that I change a color once, and have it propagates across the styles for the entire site.

G Finney wrote on Tuesday, September 22, 2009:

Very professional of you to call your colleagues idiots Matt. CSS is great for styles but a major pain in creating stable pages except for the most basic layouts.

Keegan wrote on Wednesday, January 20, 2010:

I've been working in Dreamweaver for years and never understood why they would leave tables in them if we weren't supposed to use them. Don't use tables for layout??!! That's like saying “Don't use the table to do your homework on”…ridiculous. Maybe because I'm older I didn't buy into the CSS hype. I never even heard of the W3C til recently and since they never contacted me about having to learn CSS to make a website I figured it couldn't be that important. Lots of people on a strict budget out there unable to pay for CSS coding. I asked a customer once if they'd like the website for $100 in a table or for $300 in CSS coding. Well, duh, what was their answer? Right…CSS worked its way to the middle and is now working its way to the door. I'm not revolting against it..or ragging against it. I'm just refusing to buy into all the hype. LONG LIVE TABLES!!

Marius George wrote on Friday, June 25, 2010:

CSS as a layout technology is not fit for purpose. If you make a list of all the user-interface layout systems you can think of, ordered by ease of use and/or expressive power, CSS will be at the bottom of the list. It seems that the kind of layouts that CSS wants to be good at has nothing to do with the kind of layouts my clients want to see on the screen.

Using tables is a hack? Yes. But so is using divs, floats and clears to essentially mimmick grid layouts. Divs, floats and clears were never meant to be used in this way. Yes, I can create 3 columns that fill the entire screen height. But that kind of layout is naturally done in languages such as xaml, using layout containers in markup. Doing that in CSS is essentially a hack… using something that was designed to enable text to flow around images, in order to create a grid layout on the screen.

When designing ANY kind of user interface, be that WinForms, WPF, HTML, Silverlight or Flash, intuitively one starts to divide the target space into areas. Expressing how we wish to subdivide the target area and in which ways it should be dynamic, should be easy, hack-free and without limits… not the case with CSS.

The kind of layout that CSS is good at, is the kind of layout that happens INSIDE each of the main areas in a user interface. In a grid based layout system, I can end up with a content area somewhere, and then add content in there and throw CSS layout at it: images that float left or right, with text flowing around it, etc.

That said… I am totally aware of all the reasons why tables are bad for layout. I don't actually use them for layout. It just seems that some people are blind to the huge flaws inherent in the layout capabilities of CSS. The argument goes both ways. There is no good solution right now.

Troll wrote on Tuesday, October 5, 2010:

Grrr! Just make it work! No more of this “Tables versus CSS” ruckus!

Anonymous wrote on Wednesday, December 29, 2010:

CSS should be renamed as “STRESS” because that is what it gives out to all who come across it except the geekiest of the geek.

I am a designer, i want to design, not look at code for the weekend.

CSS is horrible for design. Tables is not a perfect system but it is more efficient. CSS is a absolute disaster as many have pointed out on this page.

Anonymous wrote on Wednesday, January 19, 2011:

Thanks. I googled “Css sucks” because I am frustrated with my current project and needed validation that I'm not the only one out there.

:D

GoodGod wrote on Tuesday, May 10, 2011:

CSS SUCKS. It takes days to make what a client wants in CSS. And only hours with tables. CSS is broken. Its crap. I hate it. AAAaarrrrrrrhhh.

If you make simple layouts it can work (with hacks) If you want cool, clever, great sites, its a horrible stressful timewaster.

I loved Johns idea of tieing corners. Please can we have it…

CssIsDonkeyDoo wrote on Friday, June 10, 2011:

I hate css, that is all…

Tom wrote on Thursday, June 23, 2011:

Ditto man. CSS BLOWS. It completely, positively, 100% bites. When I get a call for a website I whip out my handy dandy table templates and cook. The success of Tables vs CSS for a production environment is at least 7/1. Meaning I can turn out 7 sites for every 1 in CSS. And it’s not because I suck with CSS but because CSS sucks. In fact CSS stands for “Code Seriously Sucks”. It sucks so hard that if you went back in time and offered a POW death by fire ants or death by coding a three page website with CSS - he’d take the fire ants hands down. And if he ended up going to hell, guess what it would be - an eternity coding in css.

SoFrustrated!! wrote on Wednesday, July 20, 2011:

I’ve hand coded sites since 1994 and I’m just now learning css for layout (got out of the business for awhile). I feel better that I’m not the only one to think that it’s so much less efficient than tables for layout. On the other hand, I guess I still have to learn it because that’s what employers seem to want. The browser screen is a square, why on earth would I think about splitting it up in any other way than rows and columns?! I can find a lot of info on syntax but not much about how to think about building the site WITHOUT rows and columns.

CodeSeriouslySucks - TooRight wrote on Wednesday, July 27, 2011:

You all have ignored the fundamental flaw - seperating content from style ! This was THE BIGGEST F&*KUP EVER !!!!!!!!!!!!!!

Have you ever been to a website where the style arrives after the content? Its IMPOSSIBLE to use. Maybe you started reading, or saw a link you want to click, and suddenly its gone - its somewherre else on the page. so you go look in the new place, only for it to move again… WHO can defend this moronic behaviour.

By the time a user has waited for all the pretty backgrounds / flash to appear on a slow website, they’ve usually got their info and gone - grumbling about what a shitty website.

We want, and WE NEED, one language. Not html/xml/css/javascript and god knows what else. When i writing mysql/sql php/perl the last thing i need is to fight with css-compliance for hours just for layout. CSS SUCKS STINKY SH8TE.

Maraka wrote on Saturday, October 8, 2011:

Finally!! I was recently reading few articles how to make columns equal sizes in CSS. My goodness, all sorts of hacks, tricks, for such a simple thing. With tables this is done in half a minute literally. CSS is the biggest blunder in the history of computing, and only idiots with no programming knowledge would like it, because its fashionable and cool at the moment.

Ch12i5 wrote on Friday, November 4, 2011:

I started coding websites with tables and wysiwyg editors back in 1999 I made the switch to CSS in 2006. I actually find it better than tables for layout. Sure it’s by no means a perfect solution but love or loath it, you can’t ignore that it is the language of choice for layout at the moment. It’s unlikely to change anytime soon and it looks like more of the same if the HTML5 CSS3 specs are to become the future.

Bart wrote on Monday, December 26, 2011:

I’ve never understood CSS. I do know how to create a good and fancy website with it. But it always caused furstration somewhere. Everytime I’ve created something with css I’ve failed, failed to keep my html clean, failed to make a short css file.

I don’t know why it’s so bad for sure, but I guess the lack of any alternative is the main reason. Without them there is no reason for the css developers to improve there language. I can create a good looking image of the website in any image editor in such a short period of time, but translating it to css take ages if not longer. CSS should be the easiest ‘language’ in the world. Only used to create the design of a website.

A ten year old should be able to use it with a cursus no longer than a few hours. But no, getting 6 rows align next to each other, creating a design that perfectly adjust itself to the amount of content takes ages.

prog exp: C++, java, pascal, ‘html, css’, as3 and many more

CSS is a solution for HTML layouts but it is not a good solution | Rhyous wrote on Saturday, February 25, 2012:
[…] CSS Sucks (for layout)Accidental Scientist (this is interesting because Layout is my main complaint) […]
CodeSucksShite - MostDefinately wrote on Thursday, March 1, 2012:

I agree. It totally sucks and blows at the same time! Seperating content from style ?!?! WTF ?!??! I work in MULTIMEDIA. Not “text with some italics”. The overall look and feel of an INTERACTIVE website is PARAMOUNT!! I’m not catering to people who are going to return to the old pages and expect a different style What retarded monkeys ass thought up this shite.

In fact, does anyone know WHO really is responsible for all this crap?

I’d like to make a table-based website (so everyone in the world can see it), that shows the Talking Turds With NO Skills that somehow managed to influence web-based technologies.

CSS dribbles out my bum wrote on Thursday, March 1, 2012:

CSS is good for making one’s hands form the Strangle A Fat Neck shape.

Mark wrote on Thursday, March 22, 2012:

I get really sick of those CSS fan boys who insist on doing everything via CSS (excluding tabular data).

I’ve found that I can generally use divs/CSS 95% of the time but sometimes it’s just far too much effort to use them and usually doesn’t make sense to anyway. Take a grid-based form layout for example, with the left column being the label cell, and right column being the input cell. This is a piece of cake using a table as the column widths and alignment will adjust accordingly. Yes you can use lis or divs to accomplish this. But divs weren’t designed to be used for grid-based layouts, it takes far longer to implement, and will most likely require more testing and cross-browser css hacks to avoid overflow and alignment issues.

Bottom line: if your CSS feels too hacky, and you know you can easily accomplish it using a table, ask yourself what is the real advantage of using CSS?

CSS is awful for layout wrote on Friday, April 6, 2012:

After using both for years, I hate CSS. One can spend hours wasting time to make CSS work right only to come across someone who finds the layout is broken in some other ways. I have old CSS sites that used to work in all browsers I tested at the time, only to find that on some browser or other it has got horrible overflow bugs. Grid layouts are nice because they just work often the first time around in a fraction of the time and CSS can be used to set their styles. I’m convinced that if CSS layouts were invented first, they would be obsoleted by grid layouts due to the obvious shortcomings of how they work. I’m not saying tables are perfect but, why the hell should I follow the CSS ideology when the result is often inferior? Simple layout shouldn’t be so complex to implement. Most of the CSS examples of how to do it right are still broken in edge cases anyways, which is pathetic.

SoFrustrated!! wrote on Sunday, April 15, 2012:

I’m back because I needed to read some voices of sanity and reason in the midst of my freak out. I am almost done building a site for someone using CSS for layout. This site has taken me almost a year picking it up on and off on top of my long hours day job . Every time I pick it up again, I have to spend a day or so trying to remember how the damn thing is put together because of the “awesome” separated content.

Why in the world would anyone want to separate the content from the layout for a 5 page brochure site?! I can’t think of one instance in which someone would redesign an entire website by just changing a few div attributes. If someone has ever done it or seen it done, speak now… otherwise, I don’t believe it ever to have been done. Result = CSS for layout is moot.

As one of my last tasks, I am trying to figure out why the site doesn’t scroll when the content is long. I’ve Googled it, I’ve read responses and yet, I cannot get it to work. Most likely, I’m putting the proper code in the wrong place which is what I always seem to do with this nonsense because the code makes no logical sense. One of the “solutions” I read was something about putting clear:both before the end div tag. WTF does THAT mean? I mean, I know what clear means but what does it have to do with a grid layout. Nothing. It’s a hack. Why are we building sites using float and clear when what I want is inherent to tables? I just want the site to scroll based on the content. Using tables, I would have had this site built in under a week. I can’t even tell you how much I loathe CSS.

shinymetaldeathgod wrote on Thursday, June 7, 2012:

I think it’s pertinent to echo in with my sentiments: Fuck this gigantic kludge of a scripting language with a rusty hot mace covered in tar and glass, and damn the ever-broken DOM to some indescribable hell. As much as I like some of the notions of css, in embracing reality one realizes this is simply a definitive scenario of “Least Worst of” gone mad. Many thanks to W3C and ECMA for never being able to make sane compromises or release one remotely sane web standard, and instead letting proprietary extensions to them get so out of hand that I may have prominent balding before they even get the chance to have grey hair. Tables suck. CSS sucks. Frames suck. Every single web standard or technology that I’ve seen to date is horrendously crippled, buggy, and focuses more on backward compatibility than digging out of the technological quagmire that we are currently in. Javascript, as much as I so passionately hate the ever-loving crap out of it, is possibly the least worst of, somehow. Which is terrible. If I die of a massive coronary before I see another version of any of this crap, it will probably be a blessing not wearing any disguise.

tl;dr To all of you fucktards and twatwaffles defending CSS: “Live a long and interesting life.”

Inshua wrote on Tuesday, October 29, 2013:

[blockquote] The clever way to do layout would have been with a constraint system. Each box has four edges and four corners, and it would be possible to bind corners and edges to create any desired relationship between boxes. This is something one could express easily in a click and drag graphical tool. Want three columns the same height? Tie their adjacent bottom corners together. [/blockquote]

its the exactely way. very close to my idea. is there any avaliable result now?

facebook comments