Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

Layers vs tables, which is best ?

Hi,
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?
0
markmchugh
Asked:
markmchugh
1 Solution
 
sajay_jCommented:
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]

<table><tbody><tr><td></td></tr></tbody></table> 
 
to replace by...
 
<div></div>

Open in new window

0
 
sajay_jCommented:
DIV is best ...I forgot to mention before.
0
 
markmchughAuthor Commented:
is it advisable to put tables inside layers ?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
zemondCommented:
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.
0
 
zemondCommented:
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
0
 
deactiveCommented:
> 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 ...

regards
Alex

0
 
glumlunCommented:
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.
0
 
sajay_jCommented:
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....
0
 
scrathcyboyCommented:
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.
0
 
zemondCommented:
@scrathcyboy
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now