Forum Moderators: phranque

Message Too Old, No Replies

Tables or layers?

Which should I use?

         

Essex_boy

7:39 pm on Aug 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Im writing a new site and have always used layers up to now, however I can see teh advantage in cobverting them to tables.

But should I do it?

crashomon

7:42 pm on Aug 30, 2004 (gmt 0)

10+ Year Member



It depends on the level of updates and maintenance that you need to do going forward.

(although, most developers start off with tables and THEN move over to layers) Also, are you sure you don't mean DIV tags instead of tables? or do you really mean layers?

Anyhow, This is what I tell my clients:
Tables are recommended for sites with little content and/or few changes.

Layers are recommended to use for DHTML and lots of 'active' content that needs to be hidden and shown depending on users actions.

Other than that, the average web surfer doesn't care one way or another (often they can't tell anyhow).

Hope that helps!

Patrick Elward

Essex_boy

5:18 am on Aug 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Patrick..

yes I mean layer <div> I think you answered my post 100% .

mincklerstraat

10:52 am on Sep 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's bad webdesign using both tables and 'layers' (or rather, advanced css, which is what I think you mean). If your design 'makes sense' - you can go back to it, and get an idea of what it's doing quickly in order to change it - what would be the advantages of tables? Modern design and the w3c recommend that you use tables only for tabular data, and use css (stylesheets) for all other layout, insofar as you can. This tends to make your HTML smaller (which is good for search engine positioning and lower bandwidth), and easier to change around. Just change the stylesheet, and all your pages have got a different look. If you already have good experience with css, go for it!

txbakers

1:08 pm on Sep 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tables

isitreal

9:48 pm on Sep 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You should look at your design and let it make your decision for you. If you have a standard full left column and right content column with footers and headers a table will give you a much more stable and bug free result, that's why almost all commercial sites using that type of layout use tables. If you find yourself trying to mimic table behavior with css / divs that's a big red flag, use the real thing and you'll get a better result. In the same way, if you find yourself trying to mimic positioned css behavior with tables that's another red flag that should tell you to use positioned css.

There are times to do use one method where another might seem more obvious, but those are very specialized instances, not good for general rules.

It's pretty easy to tell if you're making a mistake in layout method, if your code is getting more and more bloated, especially the css, you've probably picked the wrong method. And if your layout breaks on x percent of modern browsers you picked the wrong layout.

By chance a few of my last sites were done with css/divs because that method met all the requirements better than tables even though the design itself would have worked better with tables structurally speaking, but that choice was not made for layout reasons.