Using tables for complex designs - looks bad?

Associate
Joined
8 Sep 2008
Posts
149
I know table layouts where once the norm in web design and now with css they are shunned by most.

But when it comes to really complex page layouts surly tables are the best way to get that precise look.

For example I am working on a social networking type site with user profiles and so on, the main page layout of the site its self is standard divs and css XHTML markup but when it comes to creating the actual user profile page it is so complex that I found it impossible to create usings divs and css and still be consistant across browsers. But with a table based layout I can get exact look of the design and be almost consist across all modern browsers.

When I say tables I mean tables that are entirly styled by CSS, It seems that some people avoid using tables at all costs and even create psudo-tables from divs and Css rules that end up with even more complex markup than the table would have been, to me this is silly.

How do you feel about this?
 
If you need to use tables, then you don't know CSS well enough imo (and I'm not saying I do, either - far from it).

The only time tables should be used is for actual tabular data.
 
As Russ says, you don't need to use tables until you've got a table of data.

There simply can't be more markup using CSS than tables because inside the table you still use the HTML entities. So say you've got a list of anchors.

With CSS you've got a ul, li, a to style. In Tables you've got a table, tbody, tr, td, ul, li, a. You could miss out the unordered list, but there is still a tonne of rubbish there.
 
If it's not tabular data it doesn't go in a table:

* 5.3 Do not use tables for layout unless the table makes sense when linearized. Otherwise, if the table does not make sense, provide an alternative equivalent (which may be a linearized version). [Priority 2]
* 5.4 If a table is used for layout, do not use any structural markup for the purpose of visual formatting. [Priority 2]

Authors should use style sheets for layout and positioning. However, when it is necessary to use a table for layout, the table must linearize in a readable order. When a table is linearized, the contents of the cells become a series of paragraphs (e.g., down the page) one after another. Cells should make sense when read in row order and should include structural elements (that create paragraphs, headings, lists, etc.) so the page makes sense after linearization.
http://www.w3.org/TR/WCAG10-HTML-TECHS/#tables-layout

So basically if your page isn't readable when you disable CSS you're doing it wrong.
 
I agree with the guys above.
Adding tables will only make things more complicated and you should be really only using tables to display tabular data.

When I was starting out I found it very helpful to draw sites out as boxes before starting the code to understand the structure.

I think by using a good reset stylesheet to start with that you would make it easier to get the results you wanted....
Have a look at Eric Meyers CSS reset its pretty good.
 
Back
Top Bottom