Table vs Div vs Table

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Table vs Div vs Table

Post 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?
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

people said the same thing about white bread when multigrain came along ... just another yuppie fad lol
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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.
basdog22
Forum Contributor
Posts: 158
Joined: Sun Nov 30, 2003 3:03 pm
Location: Greece

Post 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:
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post 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.
basdog22
Forum Contributor
Posts: 158
Joined: Sun Nov 30, 2003 3:03 pm
Location: Greece

Post 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:
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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>.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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?
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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 :)
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

My roommate is a CSS jedi, I'll ask him.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post 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/
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post 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.
Post Reply