121 Comments
- jiminoc, on 10/12/2007, -2/+41and yes tables still have their place in HTML for presenting data
- spectre, on 10/12/2007, -2/+21You'd think that after the 17,000 posts on Digg explaining in detail not only the reason for, but uncountable methods for creating a CSS/XHTML compliant page, we wouldn't still have people on here that don't understand what the difference is.
All good developers know how to lay a page out with tables, and all good developers never do. Tables absolutely, positively still have their place in *organizing tabular data*, but kids, that's it. If you are doing anything else with them, you're Mickey Mousing it. A well structured, compliant page is so much easier to build a maintain than a table-layout page, that comparing the two from a development time, maintenance or efficiency perspective is a waste of energy.
Suffice to say, that if you build professionally for the web and you're still not sure why you should be designing in CSS, you need to do yourself a favor and study it. Not knowing it is quickly becoming an indicator that you are in the wrong field. - tempusrob, on 10/12/2007, -0/+18Hahaha ... I expected the lone comment to be "OMG who still uses tables??"
- jiminoc, on 10/12/2007, -8/+253 column layout with tables = 3 minutes
3 column layout with css = entire sites dedicated on how to make it work
client: "I need this project done by 5pm"
you: "sorry can't do it, gotta fix this css that doesn't work in opera, gotta be w3c yo!"
client: "you're fired" - successless, on 10/12/2007, -0/+14accessibility concerns from intermingling content and presentation.
can't create multiple layouts for a document with hard-coded table-based markup, like you can with style sheet switching.
document is slower to load with tables, as the entire table must be parsed before rendering content.
...just off the top of my head. - jiminoc, on 10/12/2007, -7/+19tables are just fine
they're a tool in your toolbox, your goal is to fill your developer toolbox with as many tools as you can so you have the best tool for the job. If someone tells you "never use tables" then they're taking a tool out of your box and just decreased your net worth. Its all about the right tool for the job. - valis, on 10/12/2007, -0/+12The main purpose of CSS is to separate Style from Content. Tables remain the best solution for the display of rows and columns of data. CSS is not meant to eliminate tables except in the implementation of design and style. Tables aren't inherently boring, either. These are all tools of the trade, so to speak. The problem, as already mentioned many times, is the failure of some browsers *cough*IE*cough* to properly adhere to certain standards.
- eleven, on 10/12/2007, -0/+12... and you can still do many things with a simple table that uses way less code and performs very well.
I use DIVs whenever I can, but some solutions really are complicated by them.
I'm all for the toolbox explination. - spectre, on 10/12/2007, -1/+11kbyers-
Back at the beginning, HTML was intended to be a medium to cross-reference research papers from various facilities around the globe. If you've every seen a research paper from a scientific source, there are two things you'll notice it has not shortage of: words and tabular data.
HTML itself was pretty much thrown together just as a way of putting these research papers into a format that other scientists around the world could read and understand. Because it's purpose was so simple, the complexity of the markup language itself reflected that. There were only the most basic of formatting commands , and the concept of large-scale graphical presentations was not even considered.
Once HTML began to take off as more than just a research tool, people naturally wanted to make it more attractive and human friendly. Particularly when businesses (and their respective marketing departments) stepped into the arena. Actual page layout soon became a priority. Unfortunately, there was no real provisions made in HTML to support page layout. So tables, the closest the language had to a layout feature, were basically hacked to make up for the hole in the language.
Tables are not now, and never were, intended to organize graphical or layout content. They are intended to display tabular data in an understandable way. Knowing this, in 1994 CSS was introduced as a way to separate content (which is handled very well by XHTML) from style (which is handled very well by CSS). As you can easily see from sites like www.csszengarden.com among others, is that CSS allows developers to completely restructure the presentation of data. The efficiency which comes from using CSS/XHTML well cannot be understated in comparison to using table-laid HTML alone.
The problem comes in when old schoolers try to get their hands around how CSS-based pages are created. There is a distinct difference in the logical flow of the document when you are trying to lay a page out with CSS, compared to laying a page out with tables. I swear that CSS is easier, more efficient and better in nearly every way, BUT, it does take time to make the transition psychologically for some people. - Elxx, on 10/12/2007, -0/+9Coral goodness since the link died for me:
http://icant.co.uk.nyud.net:8080/csstablegallery/index.php?css=68 - brandonhines, on 10/12/2007, -1/+9Web standards. Tables weren't designed to structure a page and that's why we have CSS.
- corexian, on 10/12/2007, -0/+7I think perhaps the point of the article has been missed. This isn't about using div tags to format a site instead of tables.
It is about using CSS to improve the design of tables. Just thought I'd point that out . . . - Haplo, on 10/12/2007, -1/+7"The main purpose of CSS is to get rid of tables."
You're wrong. The main purpose of CSS is to remove all non-semantic stuff from HTML. Tables are semantic mark up. That some people use them for other stuff doesn't mean that it's CSS purpose to "get rid" of them. - regedit2D, on 10/12/2007, -0/+6tables weren't meant to stylize pages but it does work.
and the one reason we can't just "ditch them" is because browsers seem to want to do their own thing with CSS half the time.
Both have their place and time. - artnez, on 10/12/2007, -0/+6anagoge: It's not that it's hard... its *impossible* to do. The problem is doing so vertically, but even centering a div horizontally creates the need for a container element so it'll work in IE.
google.com? tables.
yahoo.com? tables.
ask.com? tables.
microsoft.com? tables.
These are some of the biggest companies that founded some of the greatest technologies in our world wide web. MS has millions upon millions to spend on their site's design. Google's entire business plan was founded on the concept of the entire world using google. Even your grandmothers know what Yahoo is.
These companies are huge, yet they use tables. Why? Because although CSS may *seem* like the right thing to do, many browsers still do not implement it properly.
Some complex layouts made with tables will not work cross-browser with CSS, whether you fools like it or not.
Just to humor myself, I decided to start a few projects with CSS only layouts. The timeframe on the projects was large, so I had the flexibility to learn as I work. After trying to do this about 10 times, each time I stumbled upon a new issue with CSS that wouldn't work cross-browser.
Each time I tried to start a project, I remembered to avoid certain layout techniques because I knew CSS would not support them (ie: have a very clean error handler that would display a back trace of application code with a centered div... yet the centered div was impossible as mentioned above).
At some point, I realized that formulating my layouts *to fit CSS* was freaking stupid. Then I tried to really think of the benefits of CSS and whether or not they need to be solved. Let's go:
1) What about accessibility? What about blind people? And the deaf?
Oddly enough, these people were not in the target audience of any project I have ever worked on. A handicap is a handicap for a reason. You can give them parking spacings, but changing the look and feel of your product and consuming tons of man hours to make sure things work for them is not worth it if they are not your target audience.
2) Tables are so much slower in loading!
An excuse to use CSS. If tables were such a performance hit as you claim, why aren't the most trafficked sites on the net using all CSS layouts? I'm sure a few are, like Digg, but this layout is very simple (and it still doesnt display the same in FF and IE).
Tables do not slow down the loading of a page at all, and they absolutely do not consume more bandwidth. If anything CSS will consume more bandwidth.
Another little bit that the CSS folks dont like mentioning is that under certain circumstances IE6 refuses to cache images that were loaded via CSS. One of the sites I had to debug had that exact problem and racked up an extra 10 gigs of bandwidth for a month (it was a high volume site). 10 gigs is a big number for IE/CSS *****.
3) What about seperation of style and content?
I wrote my own template engine -- a very powerful one for that matter. I do not use a single instance of HTML in the business logic. That's right, not a single piece of HTML (except in the error handler). I was very strict about that and it worked out great in the end. So it goes like:
Database -> (stores values) -> Application Logic -> (generates values) -> Template Engine -> (replaces placeholders with values) -> Output -> (displays templates)
If I want to switch a stylesheet, all I need to do is add the stylesheet and write about 4 lines in the Application Logic. For that, no Javascript will be required for automatic style switching and since HTTP is stateless, going through another page load to switch the look of the page is trivial and not a good enough excuse to endure the pain of CSS.
4) Table fanboys amaze me.
That's great, but you seem to think we're all idiots. We know the difference between CSS and tables. We know that the markup looks cleaner and is easier to modify down the road.
You take too much credit for your "expertise". CSS is nothing but a set of little declarations. It's not complicated. Try writing a web application framework or a very complex algorithm then come back to the "complexity" of CSS.
We know tables suck, we just dont have any reason to change our workflow for something that isn't supported by older browsers and is not standard in the current browsers.
===
And that's it. Any other reasons to use CSS?
The fact of the matter is, the things that make CSS strong are the features -- and we all wish we could use those features because they are great.
If CSS was like the flash plugin, that works the same despite the browser implementation (because it's a plugin that is actually released by the company that developed it) I would have no problem utilizing it.
And thats it.. I cant rant anymore.
PS: The guys posting their websites and telling everyone they make money off of design... wow... those are some pretty crappy designs.. haha. "Thats what the client wanted" only means that the client didnt trust you with the design, thus it was a low paying project for a small company who could care less. Try some great designs like:
http://www.fantasyinteractive.com/
http://www.stylegala.com/
.. and so on. - mynimal, on 10/12/2007, -5/+10I think tables should be used for what they're practically intended for, and that's to display a bunch of data. I don't think it was ever intended to be used for basic website layouts.
- wnathans, on 10/12/2007, -0/+5Concept is good, but the majority of these designs are a just a smidge above butt ugly.
- DNABeast, on 10/12/2007, -0/+4The goal is to separate the content of the page from the layout of the page. This allows for faster downloading of data, Ease of use by both sighted and non-sighted, ease of updates, personal styling etc etc etc.
For instance, with a blind reader it may read out the first menu item, and then the content of the page and then the next menu items all because the elements of the page were designed to be looked at rather than sorted by their use.
In my opinion the people who fight against this are the people who don't want to relearn skills because they're under the delusion that everyone has broadband, 20" monitors and sight. - wizdumb, on 10/12/2007, -0/+4The point of CSS is NOT to do away with tables, as someone had said. The idea behind CSS is to separate style information from organizational elements of HTML. This is why tags such as and are all being deprecated, in order to try and slowly make the transition to CSS. Tables are excellent for tabulated data, as they were intended to display and organize. In fact, I think it would take more code to produce a structure similar to that of a spreadsheet in HTML without tables than it would be to use them.
- mattramos, on 10/12/2007, -1/+5Nifty designs. I for one have loved using tables in the past 6-8 months or so once I realized how many css nazis were out there that despise tables.
Although they are not meant for layout, we still cannot ditch them for a looooong time. I've been doing a lot of cool things with them on a site I'm finishing up now. - kbyers, on 10/12/2007, -0/+3Honest question here....
I understand that tables are meant for displaying tabular data, but can someone explain why it is bad to use tables to layout a page? I understand that they were not meant for it, but what makes it so bad? - jiminoc, on 10/12/2007, -0/+4no what you're seeing is people not knowing what the f'ing link points to which doesn't talk about using tables for design but how to present tabular data in a nicer format.
- evizaer, on 10/12/2007, -1/+5using div tags is not a direct ticket to standards compliance. Standards compliance implies that you are using tags in a semantially correct fashion--in other words, you are using tags the way they were meant to be used. using s for navigation and usch is an example of this.
People who continue to advocate using tables for lay-out are advocating we use the grip-end of hammers as a screwdriver. It may work if you learn how to do it, but it's far from an optimal solution. - evizaer, on 10/12/2007, -0/+4I don't know what you are looking at, but i'm seeing a lot of the pro-standards compliance people here advocating that tools be used for their intended, semantically correct purposes. Tables for tabular data and CSS for lay-out.
A source of adoption problems among out-of-the-loop web developers seems to be a matter of blatant oversimplification. The good developers here who know what they are talking about are NOT advocating using CSS for everything, they are advocating using CSS for what it is meant to do. - lukes, on 10/12/2007, -1/+5"Say you have a 100 page site. Need to make a part of the layout wider? Just pop into the style sheet, widen the appropriate item, and the whole site is changed. With tables you have to go through and edit every single one of those pages to fit what you want to do."
What about if you do what I do and use a scripting language for templating. Build the template in something like PHP, you have one file with the table layout, with the design side of it controlled by CSS. Everything's accessible to being modified at a pinch as well.
Benefits of using tables for layout is that each cell knows about the other. Ive struggled to find a way of having a footer be present at the absolute bottom of the page no matter how it is resized (within reason), across all browsers with CSS without resorting to JavaScript hacks.
CSS is GREAT, but in my humble opinion let's not chuck out the baby with the bathwater. Tables are reflexive in page layouts and have their uses. - ThePhilomath, on 10/12/2007, -0/+4It took me about a week, no joke. I did already know tables and I had a good book, but it still only took about a week. Also, tables have a lot of quirks that you have to do to get them to work completely right, what with .gif spacers and everything.
I actually found that learning css was easier, not to mention all of its benefits including the many awesome things that it can do when coupled up with javascript (look around at digg). - plncrzy, on 10/12/2007, -4/+8... of course if you need entire websites' worth of tutorials on how to do a 3-column layout with CSS, you probably shouldn't be doing web design "professionally" anyway.
/troll - inactive, on 10/12/2007, -0/+4tables don't do well across various platforms, like mobiles, machine read (accessibility), etc.
- DeejayKnight, on 10/12/2007, -1/+4Actually, I'm an instructor at a school that teaches the fundamentals of web design using XHTML and CSS as the foundation. The students go from not knowing anything about XHTML or CSS and design their first sites in a month's time.
Now as for getting the quirks, it does take time and multiple sites to really know the quirks, but it's very doable to understand it in a short amount of time. - JetTredmont, on 10/12/2007, -0/+3"Take it this way, to lay out a site with CSS you just need to place all the style information in the stylesheet. In your HTML, you just slap in some divs, or give whatever HTML the appropiate classes/ids. You use this on every page of the site. Say you have a 100 page site. Need to make a part of the layout wider? Just pop into the stylesheet, widen the appropiate item, and the whole site is changed."
You do realize that all elements in tables do accept "class" to hook into CSS, right? It's just as easy to change a width of a table column on every page of your site as it is to change the width of a div on every page of your site, and requires the exact same amount of forethought (to use class identifiers instead of inline styling).
That having been said, there are site-flexibility reasons to use CSS instead, not the least of which is that you can change the "center" column to the "left" column with the same single-stylesheet change is you used divs instead of tables. But not widths. - DeejayKnight, on 10/12/2007, -1/+4spectre, your answer is spot-on.
Not only does using CSS save you rendering time, it can save on your bandwidth by only rendering things when you need them. It also solves a lot of accessibility problems: those with disabilities that have text-reading browsers, PDAs, and Cell Phones can all view your page, except the ones that don't work with CSS will display the most important part of the page: the information.
Not to mention that tables are for tabular data. ^_^ - CptnObvious, on 10/12/2007, -2/+5I know tables weren't ment to be for the layout but does it really matter? The computer wasn't ment for porn but does that mean we can't have it? I'm all for standards but tables help accessibility IMHO. In a lot of CSS layed out webpages different fonts and sizes can screw the layout up but it doesn't as much with tables because they are contained in dynamicly sized boxes.
- JRMillion, on 10/12/2007, -0/+3got some funny comments here :)
I switched to full xhtml/css about a year and a half ago, and will not turn back. I was using a lot of css before that too, but still had some tables in there for layout
I agree with the people who said if you don't know the benefits, then hit the books.
On top of that, with the recent "rebirth" of javascript, leaner markup is a huge advantage.
Also, CSS is not about just about replacing tables with divs, if you did that youd end up with just as much of a mess. Its about using the appropriate tags, and then styling them as needed. For example taking a simple looking unordered list and making a beautiful menu out of it.
PS- I also get paid for it :) - nighthwk1, on 10/12/2007, -1/+4matt:
Sorry, but I wouldn't talk about your awesome design skills while linking to those sites. Especially triosprint.com. Has anyone viewed the source on that one? It's hard to believe that web designers are still writing code like this. - ryan_merket, on 10/12/2007, -0/+3@jiminoc
client: "I need this project done by 5pm"
you: "sorry can't do it, gotta fix this css that doesn't work in opera, gotta be w3c yo!"
client: "you're fired"
------------
After you slice it all up and deliver it to the client at 4:45pm and they say they need to change the width, or a graphic you have to go back and RE-slice the entire site... and miss your deadline... all I have to do is change the stylesheet.
And yes, I can do a 3 column website in XHTMl/CSS faster or equally as fast as I used to do table websites 2 years ago. - lalindsey, on 10/12/2007, -1/+4I have never been in a situation where a table uses less code than using a div, or stylized html element using CSS. That's just ignorant crap.
- joshduck, on 10/12/2007, -4/+7CSS is intended to replace all design elements.
Using CSS to replace tables is not as easy as it should be, when you are trying to do things like three column layouts. Using floats and clear:both feels very hack-ish to me. It become even more difficult if you want other effects, like having the columns match each other's height so you dont have a jagged bottom edge. - mattramos, on 10/12/2007, -0/+3paulc201: I did not design those websites. Those are websites that I am in the process of redesigning.
Yes, they suck BADLY. - Greg-J, on 10/12/2007, -0/+2Arguing Tables vs. CSS is simply ignorant. It's your damn site, design it however the hell you want to. If you think using CSS impresses people and that's a good reason to use it, run along now. I use tableless layouts simply because I have O.C.D. and my source has to be perfect. It's not funny or cute, it's kind of annoying really. I spend 2 to 3 times the amount of time designing around semantically correct markup than is needed.
Damn you CSS! - nighthwk1, on 10/12/2007, -0/+2I'm all for supporting web standards, but tables are still useful for layout purposes. I would love to get rid of them, but until about 75% of browsers are CSS-complient, and we have things like working vertical-align (without complicated hacks), I don't think it's realistic.
However, I do write complient XHTML Transitional code (I do some work with XSL:FO, so yes, I do need XHTML), and use CSS whenever possible.
The real problems with web design these days are MS Office generated crap, tag soup, missing doctypes, and IE-only code. Tables can stay around a little longer, IMO. - JRMillion, on 10/12/2007, -0/+2I will agree with you there, vertical alignment is a pain.
- evizaer, on 10/12/2007, -0/+2The problem with your arguement is that--aside from the fact that none of your analogies are analogous unless taken in an extremely broad sense--all of the physical objects you meantioned are perfectly fine at doing what they are marketted for. Highways work well for car-use, silly putty is a fun toy, and porn is a perfectly valid use of a computer (well, not morally, perhaps), but there is no optimal toy, no optimal road-way (speaking of just highways, here), there is no optimal use for a computer. Tables weren't designed for lay-out, so they are stretched beyond their capabilities when used for lay-out and make your site bulkier and harder to maintain. Using tables is an unnatural way to code design. That's the point.
- anagoge, on 10/12/2007, -0/+2You'd think that a centred DIV wouldn't be such a hard thing to do wouldn't you? This bugs me too. I also don't like all of the hacks that reside in CSS, regardless of how good they are. They're still hacks. I prefer DIVs to tables any day, but tables do have their uses.
And as for site-wide changes regarding the width of a table or something similar...there's always find/replace?
...and that's a joke by the way...well, kind of. - topcataj, on 10/12/2007, -0/+21200 diggs for a page with some table colours/borders?
And 115 comments arguing about CSS Vs Tables when the actual link is just on about tabular data tables anyway.....
Once again I'm astounded at the group intelligence of the digg community..... I'm tempted to take it off my rss list after this. - ndizzy80, on 10/12/2007, -0/+2CaughtThinking pretty much summed it up.
I’ve been designing for about 15 years (I’m 25) and yeah, I “still” use tables for the majority of my layouts like 99% of the designers out there. Those 99% of us out there are the successful ones (success being a 6 digit income) that listen to our clients rather than say… well we can’t do that because it’s not W3c compliant. Once in a while I’ll see a site like Digg and get excited about using a complete CSS/div layout. Then I look at the code with all the commented browser mods and realize how far we really have to go to get there. Fact is that IE still has the majority of the market share. Plus… are you ready? Make sure you’re sitting down… Executives don’t care about what purpose a table was intended for. If I presented any of the css sites posted here at a meeting, I’d be laughed out of the boardroom with my head hung low. Maybe I’m breaking some “code of ethics” by the css-nazi’s out there by still using tables, but hey, it gets the bills paid and my “retire at 40” fund gets fatter and fatter.
In my opinion this css/div only stuff is like Flash when it first came out. Everyone tried to make a full flash site and it looked like garbage and didn’t work half the time (I’m sure we all had that amazed look on our faces when we first saw a shape tween). Today we’re all a bit more intelligent when developing with flash and amazing things can be accomplished if you know how to use it correctly. My advice, spend less time playing around at standards sites and divide your time researching what sells and what’s pushing the limits (www.leoburnett.com). Don’t get me wrong, CSS are great and I use them often together with php, mysql and yep, drum roll….. tables… Every industry/movement needs it’s “hippies” among us that try new things and push limits and don't care about their income, but if you’re like me you’ll be using tables for a while yet. Sorry if this pissed anyone off, just thought I’d give my two cents. - mrASSMAN, on 10/12/2007, -4/+6look, i love CSS as much or more than the next person.. but holy hell the front page has been succommed to a deluge of CSS related articles in the past month and even i'm getting tired of it..
- topgigmedia, on 10/12/2007, -1/+3Are you kidding me? What about web standards? Acessability and usability? Tables are just plain crap, and anyone who uses them is just plain lazy and, well, dumb.
What about email blasting HTML messages... Divs and CSS do not work. Tables are the only way to ensure that all of the major email clients will render your messgae. Sorry Table haters... CSS is not a global solution for coding HTML. - artnez, on 10/12/2007, -0/+2I'm a bit late in the game here... but I'll make a deal with you "never use tables" junkies. You show me a way how to center a DIV into the middle of the browser window *without using javascript* and i'll never touch a table for designing a site again.
Oh, and the div must be centered with a variable height and width. I already know about the DeadCentre technique so dont link that. DeadCentre is cool, but you still need to define the width and the height for it to work. - mattramos, on 10/12/2007, -2/+3I guess I didn't explain.
No, I don't use tables for layout.
Yes, I style tables when I need them and replace them with definition lists whenever I can.
No, you can't deny the need for them.
Yes, I am a web designer and get paid well for it. - sensibledriver, on 10/12/2007, -2/+3If you use tables for layout (aside from tablular data) and have a hard time getting the concept of dividing data/content from presentation, you are a worthless hack. I am glad I make money off of your ex-clients when they need their stuff fixed by a professional- I get to charge double 'cuz I have to weed through all of your ***** extra mark-up.
-
Show 51 - 100 of 121 discussions



What is Digg?