4 ms·
This whole argument seems to be spiraling out of control, and I doubt a single person will change their mind either way. Things not to bother arguing about in
by ejs 18y ago
This whole argument seems to be spiraling out of control, and I doubt a single person will change their mind either way.
Things not to bother arguing about in public (since no one will change their mind):
Religion
Politics
CSS vs Tables for layout...?
- alabut 18y agoTrue, it hasn't changed my mind away from being pro-CSS. It has however, made me realize how much of a learning curve CSS must be for many programmers compared to tables, much more than I thought, so I'm less likely to debate the finer points with coders that use tables and just stick to enjoying the benefits of stylesheets for myself.
- fauigerzigerk 18y agoIt's not about the learning curve. In my view, it's about the productivity of competent web developers and designers. Referring to the learning curve is just repeating the disputed claim that people who deny the suitability of CSS for layout are just invariably incompetent. That's an excuse. And I don't agree with ejs. I think it's an important debate because CSS layout problems are a major reason why so many people use Flash. My own opinion about this matter is not cast in stone. I may change my mind based on good examples of CSS layouts that don't break and actually make maintainance easier.
- cedsav 18y agoYou could look at the html source of csszengarden. I'm guessing it uses a bit less markup and is a bit more readable than an equivalent table based layout. CssZenGarden also shows that refactoring a CSS-driven site is easier since you can do it without changing your templates.
- chairface 18y ago> CssZenGarden also shows that refactoring a CSS-driven site is easier since you can do it without changing your templates. In my experience, this just doesn't happen in the real world.
- cedsav 18y agoI'm actually refactoring our marketing site, and most of the the work is done in CSS stylesheets. I sometime edit the markup to change classes or add the occasional <div>. What I gain from CSS is that I can easily play with the layout and get a feel of what works best. I also code by hand. I guess table-base layout would be easier to experiment with using a wysiwyg editor.
- chairface 18y ago> you can do it without changing your templates. ... > I sometime edit the markup to change classes or add the occasional <div>. Case in point. > I guess table-base layout would be easier to experiment with using a wysiwyg editor. Christ on a cracker, if a person is using a wysiwyg, they shouldn't even be in this discussion.
- SystemOut 18y agoThat's not true. One of the products my team has built is a "white-label" syndication system for our content. We built that driven by CSS because it's the only way to drastically change the look and feel without touching the JSPs. We currently have at least 30 or so different looks for the same outputted HTML. As long as you attach classes/IDs everywhere and do it intelligently you can do all sorts of funky overrides (learn selectors!) to change the way the pages render and seriously never touch the HTML. You can't radically change the flow of the pages but that's not the point. The other area where CSS driven design makes things easier is debugging or experimenting with the look and feel of the page using Firebug. It's alot easier if all of your positioning and layout is set via IDs and CSS classes because I can go in and modify properties, add properties, etc. without needing to change CSS files or edit the document inline (it's much easier to modify CSS than inline style settings). Tables make this harder to do because tables are a pain in CSS with regard to which elements take specific CSS elements. I'm not a CSS zealot but once you learn CSS properly (and it seriously doesn't take much time if you just focus on it a bit and find someone good to mentor with a bit) it makes things so much easier, especially if you're using the same generated code across different sites requiring different look and feels.
- Erwin 18y agoTo be so CSS-styleable, CSS Zen Garden uses multiple layers of DIV in DIV in DIV all over the place. Hardly better than table. Also this gem: <div id="extraDiv1"><span></span></div><div id="extraDiv2"><span></span></div><div id="extraDiv3"><span></span></div> <div id="extraDiv4"><span></span></div><div id="extraDiv5"><span></span></div><div id="extraDiv6"><span></span></div>
- KrisJordan 18y agoSaying "CSS is a better solution than Tables for reasons [X,Y,Z] but it is at the cost of a higher learning curve," is much different than saying "CSS is a better solution than Tables for reasons [X,Y,Z] but you're too incompetent to understand." CSS layout problems are not why so many people use Flash. Flash has popularity because for pure designers working in a GUI on a canvas where you can pixel place every item with drag-and-drop is natural and taught in school. As for examples, the article calls out the canonical CSS layout example site made specifically for this purpose years ago: http://csszengarden.com/ http://csszengarden.com/
- narag 18y ago...disputed claim that people who deny the suitability of CSS for layout are just invariably incompetent. That's an excuse. It's worse than an excuse. It's ignoring one basic fact. One of the best things of HTML as it was understood ten or fifteen years ago was that a lot of people (to say "everyone" would be an exageration) could write it even with a text editor. This is a part of the "democracy" of the Internet. I think that a steep learning curve or 500+ pages standards are not a good idea for this medium. The guy of the story about Mathematica was right in one thing: it's not good that writing graphics stuff is so difficult and "beaurocratic". There is a bunch of aficionados that take every chance to create what now is still reserved to programmers or designers because the tools have a shitty usability.
- palish 18y agoGreat! I think the internets would be a better place if more people embraced "be quiet and enjoy it for myself". If other people are missing out, oh well. That's a competitive advantage. It seems like people on both sides of this debate are seeking validation rather than trying to help people.
- llimllib 18y agoPartisanship has benefits, and I hope people aren't being quiet and enjoying awesome things that I don't know about. Fight for what you think is right! (Disclaimer: I'm not advocating for senseless opposition; rather for reasoned partisanship and against "be quiet and enjoy it for myself".)
- joshwa 18y agoCanon vs. Nikon ;)
- jacquesm 18y agoIt took me all of 5 minutes to learn how to use tables back in oh... '94 or so, I remember the tutorial by some lady working for the fledgling netscape corporation. To this date - and I don't think I qualify as stupid - I haven't fully grokked the css way of doing layout, there is always the little 'clear' or some other detail that keeps me from getting it right in one go. CSS works, but it is harder than it should be, the idea of something new superceding something older is that it is better and easier to use at the same time. If CSS was really that great we wouldn't be having these debates, people would have switched en masse years ago and the 'table' tag would have been deprecated. I think any such attempt by w3c would be met with a fairly serious revolt.
- KrisJordan 18y agoThe table tag's purpose is to host tabular data. Hence the <thead>, <tfoot>, and <tbody> tags for column headers, footers, and body data respectively. Cite: http://www.w3.org/TR/html401/struct/tables.html http://www.w3.org/TR/html401/struct/tables.html
- dasil003 18y agoTables were not introduced until '95. I've been designing web pages since then and I went all CSS in 2001. If you were doing serious design things weren't quite so rosy as the picture you paint. Hobbyists and non-designers don't realize what designing with tables was really like. There were crazy idiosyncrasies like whitespace affecting table layout. The late 90s an incredible amount of effort was dumped into developing table-based layout techniques. Tools like ImageReady evolved to make slicing images easy, but the underlying code was an abomination. Depending on your design you end up having to have tiny cells with tons of rowspan and colspan attributes or deep nesting. Neither one of those is maintainable at all, and when you bring a template-based back-end it can get downright insane. And once you get to those kinds of designs, things aren't nearly so predictable as some seem to think. Try fixing the width of one column in a table and then predicting the width of each of the remaining columns. The table cell width computation varies frustratingly between browsers and the particular content in the cell. Even worse, this situation will never be resolved because all development effort towards advancing the state of web design is happening in CSS. The abilities you have today are what you will have forever, except new browsers may introduce bugs. The problem with this debate so far is the oversimplification of the issues. CSS was not created to simplify a 5-cell table layout by turning it into 5-div layout. These degenerate examples aren't representative of the real-world design issues that gave rise to CSS in the first place. It's like somebody saying PHP is a better language than Haskell because "functional programming is confusing"--sure go for PHP if you just need to get something done, but if you are serious about the craft of programming than you need to look to the state of the art. CSS is far from perfect. But people need to have some appreciation of the facilities it brings to the table (despite imperfect browser support). The capabilities are much richer than tables (in fact they are a superset in the spec), and designed to solve complex design issues across a range of devices and media. This is all achieved in a human readable and editable language. Try writing postscript out by hand some time.
- joe_the_user 18y agoMy mind has change! I was Div-only and now I think mixing Tables and Div can be good, even preferable. "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.)" This sealed it. The tool should the servant, not a thing that always trying to learn more about. Anything that really is inherently hard to use is bad, plain bad. There's no excuse. Things that are until you learn something can be great. I've done complicate layout in CSS and the process of trying to make it work never got easier or clearer. At a certain point, you have to say "this is just a bad way to do things". It would be nice if CSS/html somehow added objects which had the virtues of both Divs and tables. BUT I now realize that design mantra "never use tables, always use divs" was just ideological nonesense. Not that I would always use a table but I will certainly consider both options from now on I realize now that one of the truly evil aspect of divs is that they keep you from having localized object on your page. Want to guarantee that you will have three column on your page, good friggin' luck.
- anc2020 18y agoIt changed my mind too. As for only now realising that tables really are the only easy way to do it, I guess partly we've come to accept that the web is broken thanks to IE, so it doesn't stand out as odd that layout is hard with CSS.
- joe_the_user 18y agoI would like to also say that the failure of CSS/Div is kind-of discouraging. Within the history of html, tables were intended for tabular data. The ideal of divs is to have an element that is specific to layout rather a tag for tabular data that one just happens to use for tabular. Html, in general, is a messy. Html is one of the most amazing programming success stories, in the sense that it is the widely programming language by non-programmers. SIMPLE html created the web. Html that is that was so simple that the friggin w3c standards would never accept it now. And the "progress of standards" has essentially only made this mircle lousier. You could blame corporations but it really seems like simple bureaucracy was just as much to blame.
- nx 18y agoI'm pro-CSS as well, but the OP made a great point. There are many important bugs in the implementation that stop us from completely separating content from presentation, yet it's the platform with largest userbase, and all that causes. Loads of viewers competing against each other, add-ons, Javascript, tons of different technologies with the same purpose, and it gets really hard to standardize anything in this environment. I believe in the W3C. I think we need a better way to separate content from presentation, and we need less permissive standards, but that also make it easy for less techy people to use the Web. And the most used browser is incredibly buggy. So it's a mess. I would like to use CSS instead of tables, but CSS is not quite perfect yet.
- xenophanes 18y ago> I doubt a single person will change their mind either way I changed my mind (a while back). i learned about web dev and read you should use CSS not tables. so i made some layouts with css and generally believed that. then i found some pure css vs tables arguments here. and i decided tables are fine.
- Devilboy 18y ago'CSS vs Tables' already falls under 'Religion'
- newt0311 18y agoemacs vs. vim.