Page 1 of 3

Table vs Div vs Table

Posted: Thu Jan 08, 2004 3:35 pm
by Gen-ik
Could someone please explain why so many people are suddenly trying to develop websites that contain no tables in them, and when the words "just use a table" are mentioned it's like someones just called their parents scum?

As far as I'm concerned it's good practice to use one or two tables in a website as the main structure, and this whole tables-are-the-spawn-of-satan thing is just a passing fad.

Ohhh look, there's the tables-are-the-spawn-of-satan band wagon... let's all get on it :roll:


Sorry if this offends anyone but my brain just can't work out any sound reason for using all-divs-no-tables in a website.


Anyone care to enlighten me?

Posted: Thu Jan 08, 2004 3:48 pm
by xisle
people said the same thing about white bread when multigrain came along ... just another yuppie fad lol

Posted: Thu Jan 08, 2004 3:57 pm
by Gen-ik
xisle wrote:people said the same thing about white bread when multigrain came along ... just another yuppie fad lol
Yeah but multigrain bread has a purpose... it's better for you than white bread, it's full of fibre, and it's got lots of erm, bits in it.

Having a website which is developed with the "must.. not.. use.. any.. tables.." way of thinking is, as far as I can see, a bit pointless.

Posted: Thu Jan 08, 2004 3:59 pm
by basdog22
@Gen-ik:

I don't think people think of tables this way :)

I just think that it is a new concept of coding and everyone wants to be trendy :D

But if you think a little bit more than the next question comes:

What will happen if W3C or whatever deprecate the table tag as a layout way and 70% of the browsers out there start displaying tables only if these contain data???

----

Well i am not a great philosopher but you can rephrase the question if you like :roll: :roll: :roll: :roll:

Posted: Thu Jan 08, 2004 4:14 pm
by Gen-ik
basdog22 wrote:What will happen if W3C or whatever deprecate the table tag as a layout way and 70% of the browsers out there start displaying tables only if these contain data???
Good point... but I think the chances of that happening are about 100 to nil. :)

Divs are good at what they do but I don't think they are really designed to handle very structured webpage layouts, simple ones maybe but not the more complex sites.

Posted: Thu Jan 08, 2004 4:21 pm
by Bill H
Hooray, double hooray, for you. I love tables, use them all the time and develop very sophisticated layouts with them. I fell into the "tables are horrible" trap for about two pages before I realized divs suck. They cannot do half of what tables can.

So, us 60-yr-old web page designers aren't always wrong. Hot ziggedy.

Posted: Thu Jan 08, 2004 4:29 pm
by basdog22
Divs are good at what they do but I don't think they are really designed to handle very structured webpage layouts, simple ones maybe but not the more complex sites.
why do i only have problems creating complex layouts when i test them on IE???

What i mean is ... You can make a complex layout that looks fine with Opera or Mozilla and sucks with IE... but you can built it.

You might work 250% more to create it but you will be able of transforming it with 90% less effort everytime you decide to do it...

I think that the "war" is not div vs table but css vs table :wink:

Posted: Thu Jan 08, 2004 5:40 pm
by uberpolak
Everything you can do with a table you can do with div's and CSS. Often you use much less code, which in turn reduces your bandwidth, which makes it worthwhile if you get a great deal of traffic. Tables are still good for tabular display, but as for layout, the technology is growing. It's not always as easy to use div's and CSS, but it's something worth learning.

Posted: Thu Jan 08, 2004 6:21 pm
by Pyrite
DIVs/CSS are for layout. Tables are for representing and displaying data.

There are *tons* of ungodly amazing sites out there that use no tables and all divs. Saying that you can't create complex sites without tables is total <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>.

Posted: Fri Jan 09, 2004 8:07 am
by Gen-ik
Pyrite wrote:DIVs/CSS are for layout. Tables are for representing and displaying data.

There are *tons* of ungodly amazing sites out there that use no tables and all divs. Saying that you can't create complex sites without tables is total <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>.
It would probably help to convince me if there were some good examples.. and I'll say that again.. GOOD.. examples of highly structured sites which use all divs and no tables.

Any links?

Posted: Fri Jan 09, 2004 8:09 am
by Gen-ik
One other thing that people seem to keep missing is that tables and CSS can be used together the same way as divs and CSS can. It's not just a case of table vs div/css :)

Posted: Fri Jan 09, 2004 8:10 am
by JayBird
yeah, i would like to see some GOOD site that don't use tables.

Not sites that someone in their bedroom has done, some large commercial site who have opted NOT to use tables. Bet ya can't find many.

Mark

Posted: Fri Jan 09, 2004 8:24 am
by Pyrite
My roommate is a CSS jedi, I'll ask him.

Posted: Fri Jan 09, 2004 12:54 pm
by Roja
http://msn.espn.go.com/

Only two tables used - one for an ad that they couldnt avoid. Neither is neccesary for the site to look "correct".

A good article about the transition, and why their standards-based, less-tables design made sense, saved money, and has been a success:

http://devedge.netscape.com/viewsource/ ... erview/01/

Posted: Fri Jan 09, 2004 1:57 pm
by Gen-ik
Ok I've read the interview and seen the site... and I can now that that I am now more convinced by div-layouts than I was at the start of this topic. However, there are a few things which still don't "float my boat".

First of all the page size was reduced by about 50% (or 50K) which is good... but the actual CSS file will increase dramatically with the number of different divs on the page... so page-size reduction using Divs is really not worth mentioning because it balances itself out.

Next. Two other major problems with div-layouts are true vertical-alignments (which is mentioned in the interview) and also centering the entire page on-screen. Using absolute positioned divs and trying to make your page centered is impossible unless you use very heavy amounts of JS code to detect and position each div, and using non-absolute positioned divs will cause display problems on various browsers.

Like I said I am more convinced than I was, but I'm still not 100% about the whole div-no-table concept due to the number of problems for site layout it can cause. Placing a footer at the bottom of a page is another problem mentioned in the interview, especially if the content of the page is dynamic, and using a single table for this seems like the most logical way of doing it.


Each to there own I guess.