Layers vs tables, which is best ?

Posted on 2008-06-12
Last Modified: 2010-08-05
I've been developing sites for a few years, and i notice that a lot of sites now use layers, which is best and  why?
Question by:markmchugh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 21767087
Easier to load, since code size reduce to a large extend.

Easier to maintain and arrange in any manner. No conflict with row or columns.

Can hold any amount of texts, object using cascading style sheet. [css]

to replace by...

Open in new window


Expert Comment

ID: 21767099
DIV is best ...I forgot to mention before.

Author Comment

ID: 21767108
is it advisable to put tables inside layers ?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 21767371
Yes you can put tables inside layers,

Semanticly tables are for displaying tabular data, not presentation, div are created for such a purpose. So in addition to sajay_j using tables for layout and presentation purposes is technically an incorrect use of markup.

Expert Comment

ID: 21767383
So in terms of layout its not a condition of ease it is a matter of right and wrong, I still agree with sajay thou

Expert Comment

ID: 21767389
> is it advisable to put tables inside layers ?

there's actually no problem with that.
However HTML tables are supposed to display only data nested within and not to be used as layout purposes.
You can do both of course, but it is quite proved now css are far away better than tables ...


LVL 11

Expert Comment

ID: 21767447
the best thing about div and css based layouts except what has already been mentioned is from a turn around of sites point of view.
div based layouts are highly reusable.

Expert Comment

ID: 21775006
Yes It is advisable to put, there are situation where we add tables.. example are like; CMS sites. Like Joomla, Mambo. It is powered by php, so programmers usually uses tables to list the values over there. I agree to ZEMOND for his correct suggestion on div and tables. Actually I did not mean the usages of TABLE vs DIV. I only mentioned important of using DIV as the question mentioned....

Hope your question solves from above solutions....
LVL 44

Accepted Solution

scrathcyboy earned 500 total points
ID: 21775420
The new CSS specs try to tell us that tables for layout purposes are obsolete.  Maybe, but they still work perfectly both for tabular data AND for web page layout.  I find CSS-only layouts, using DIV and SPAN do not attain the same granularity as a detailed table layout.  They are fine for simple pages, but when I get to very complicated pages that need very precise layout parameters to render identically in all browsers, then I use a tabular layout.  It is so much easier to render exactly.  CSS can approach the same precision, but there is often cross browser problems in using absolute positioning.  It is your choice.

Expert Comment

ID: 21783836
I would agree that tableless layout are more difficult to master, explaing what a float is can be difficult in itself. But I have to disagree with your statement that a div layout cannot be as detailed as a table layout, If fact div layout can be as accurate as 'per pixel' too any photoshop design while still maintaining cross browser compatability (If you know what your doing) and cross media platform compatability. (readers, phones, pilots etc...)

Just because something works dosnt mean you keep using it, in an industry where the only constant is change, your going to be left behind.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question