Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Which to use: CSS layouts VS tables ?

View Poll Results: Which to use: CSS layouts VS tables ?
Poll Options:
I use CSS layouts for my web pages 30 votes (81.08%)
I use HTML Table layouts for my web pages 5 votes (13.51%)
I am undecided 2 votes (5.41%)
Voters: 37. You may not vote on this poll
Which to use: CSS layouts VS tables ?
Thread Tools
benandkelley
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Nov 3, 2004, 11:02 AM
 
The other day I was in a bookstore and looked at "Designing with Web Standards" by Jeffrey Zeldman. Moments later I looked at a magazine that covers web development and graphic design. The two sources contradict each other on the topic of using CSS layout or table layout.

Which one do you use? Is CSS layout advanced enough and accepted by enough browsers to be used everywhere? ESPN thinks yes, but the US Gov't thinks no, and many news sites are using tables but are considering CSS.

Is it time to make the jump to CSS, or is it better to wait a while?
What are your thoughts?
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Nov 3, 2004, 11:09 AM
 
With some minor fixes to IE (conveniently provided by many JavaScript developers out there, most notably Dean Edwards, it's ready and waiting. There need not be any more obstacles to CSS.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
benandkelley  (op)
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Nov 3, 2004, 11:35 AM
 
Originally posted by Millennium:
With some minor fixes to IE (conveniently provided by many JavaScript developers out there, most notably Dean Edwards, it's ready and waiting. There need not be any more obstacles to CSS.
How are things with Netscape? Such as NS 4.0 ? I ask this question because some of my work is with the US Fed. gov't and they have users who are still with old OS's and NS 4.0
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Nov 3, 2004, 12:03 PM
 
Originally posted by benandkelley:
How are things with Netscape? Such as NS 4.0 ? I ask this question because some of my work is with the US Fed. gov't and they have users who are still with old OS's and NS 4.0
To call NS4 problematic is an understatement. You have my condolences if you actually do have to work with that. Any later version of Netscape is no problem. NS4, however, is trouble.

You're stuck with tables for anything that has to work with NS4. However, I recommend doing this as little as possible. Seriously. Make your life as easy as possible by minimizing your need for table-based layouts.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Nov 3, 2004, 02:00 PM
 
It's a shame that "check it out in Netscape" still lingers around the dusty haunts of web design.

One of my co-workers, the one who tells me what to do on a particular project, is always testing my work out on Netscape 4, it's a right royal pain, especially when I keep showing him that Netscape provides less than 1% of the hits.

OK, cross browser compatibility has levels of desirability according to the intended audience, but let Netscape die it's death, please.

This attitude is more irksome for me when I point out to him repeatly quirks that are showing up in Mac IE5 and Safari..... "Macintosh, that's rubbish" is his standard reply.

Anyway, back on subject, css is very very nice, I put together my last demo with and tweaking it along the way was a breeze. I do however try to stick with CSS1 standards whenever possible, in case something nice I might make using CSS2 breaks apart.
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 3, 2004, 07:00 PM
 
I haven't investigated this fully, but making a table-based layout would be in violation of some of the WAI initiatives, would it not? Which would mean that the US Government could therefore be breaking its own rules? Just a thought...

http://www.w3.org/TR/WCAG10/wai-page...ble-for-layout
Computer thez nohhh...
     
benandkelley  (op)
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Nov 3, 2004, 07:50 PM
 
Originally posted by Simon Mundy:
I haven't investigated this fully, but making a table-based layout would be in violation of some of the WAI initiatives, would it not? Which would mean that the US Government could therefore be breaking its own rules? Just a thought...
The US Federal Gov't (Dept. of Education, Dept. of Health) is ok with the use of HTML tables as long as they comply with Section 508 rules, priorities 1, 2, 3. I don't know about the other departments.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Nov 4, 2004, 07:57 AM
 
Originally posted by Simon Mundy:
I haven't investigated this fully, but making a table-based layout would be in violation of some of the WAI initiatives, would it not? Which would mean that the US Government could therefore be breaking its own rules? Just a thought...
Not necessarily; if the layout makes sense in other devices (particularly screenreaders) then there's no problem.

However, pulling off Section 508 is extremely difficult to do with a pure-table layout. If you absolutely must support NS4 then you're pretty much screwed, but you can try and minimize the damage by using as few tables as possible while making sure it still works.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Diggory Laycock
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Nov 4, 2004, 10:25 AM
 
There's nothing wrong with tables - they are valid XHTML.

However - they should only be used for tabular data - e.g. telephone bill / table of results etc...

Using them for layout positioning purposes is bad.
You know it makes sense. ☼ ☼ ☼ Growl.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Nov 4, 2004, 12:37 PM
 
Originally posted by Diggory Laycock:
There's nothing wrong with tables - they are valid XHTML.

However - they should only be used for tabular data - e.g. telephone bill / table of results etc...

Using them for layout positioning purposes is bad.
Indeed. That's the point: tables have a semantic place (namely, actually making tables), and they should certainly be used in that place, but not elsewhere.

At the same time, if you're unfortunate enough to have to support NS4, there's not much you can do with CSS layout. NS4 just plain sucks that badly.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
DVD Plaza
Senior User
Join Date: Oct 2002
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
Nov 4, 2004, 09:21 PM
 
Originally posted by skalie:
One of my co-workers, the one who tells me what to do on a particular project, is always testing my work out on Netscape 4, it's a right royal pain, especially when I keep showing him that Netscape provides less than 1% of the hits.

OK, cross browser compatibility has levels of desirability according to the intended audience, but let Netscape die it's death, please.
Don't you mean let NAVIGATOR die its death - there's nothing wrong with Netscape (version 6+), Mozilla, Firefox, Camino, etc which all use Gecko.
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Nov 5, 2004, 03:36 AM
 
Originally posted by DVD Plaza:
Don't you mean let NAVIGATOR die its death - there's nothing wrong with Netscape (version 6+), Mozilla, Firefox, Camino, etc which all use Gecko.
Good call, and also good ammunition next a Netscape Navigator bug is pointed out to me.
     
benandkelley  (op)
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Nov 5, 2004, 01:11 PM
 
I must admit that I'm kinda surprised by the percentage of people that claim to use CSS for layouts. Maybe this small sampling is somewhat leaning towards CSS, so that would account for the CSS majority.

Just out of curiosity, I wanted to find some sites that have recently been created (in the past year) and are built to appeal to a lot of users. It occurred to me that the Presidential candidate sites are perfect to look at. After looking at Bush's and Kerry's web sites, they appear to be using a LOT of tables. Maybe there's some CSS in there, but it looks like the layout is TABLE based.

Also, the NYTimes.com and WashingtonPost.com have a fair number of <table> commands.

Just thought that was interesting.
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 5, 2004, 07:34 PM
 
It's been my (very subjective) experience that a lot of in-house developers don't know any better than to use tables as a layout tool. In a couple of ... let's say 'energy companies'... the developers will only use Dreamweaver in WYSIWYG mode and stack up the tiles as they complete layouts. A huge multinational 'maker of aircraft engines' is still FORCED to use Frontpage as their web authoring tool. Truly mind-boggling, given that they use 'innovation' as part of their brand platform...

Beauracracy, laziness and budgets are 3 compelling reasons why table-based layouts are so prevalent. In the same way that someone can stick together some IKEA furniture and say 'WOW - here's a chair' and still have cheap crap, one could spend extra time, care and craft and handmake their final product and produce something that is enduring, valuable and sturdy.

Why would 9-5ers who work in a company that doesn't inspire them want to find newer and better ways to build web pages? Especially when ridiculous deadlines, marketing-driven layouts and isolation from your peers makes inspiration rapidly diminish.

Anyway, /RANT - just because it's popular doesn't make it right.
Computer thez nohhh...
     
calimehtar
Forum Regular
Join Date: Nov 2001
Location: Toronto Canada
Status: Offline
Reply With Quote
Nov 7, 2004, 11:06 PM
 
I use heavy css and tables both. 100% CSS layout is a laudable goal, but it may not be practical for you.

If you're doing a fairly simple layout, then use CSS -- it'll cut down your maintenance significantly. If you're feeling adventurous and don't have to support IE 5 Mac then use CSS. If you have to support IE 5 Mac, have a fairly complicated page, and full compatibility and high development speed are priorities then use full CSS as though it were a table-free layout, but use tables.

The disadvantages to using tables this way are minimal -- you may get a slightly heavier page and slightly slower rendering speed (calculating location and size of table cells tends to be tricky for browsers). The main advantage of using tables is that positioning tends to be more predictable cross-browser (people have been building table layout longer than full css layouts, so more bugs have been worked out), and you'll find that many advertised benefits of CSS are pie-in-the-sky -- full separation of display and content, full accessibility regardless of visual impairment etc.
     
phoenixboy70
Mac Elite
Join Date: Jun 2004
Location: ma, germany
Status: Offline
Reply With Quote
Nov 8, 2004, 07:31 AM
 
i've been going for 100% css 2.1 for the last 4 months or so.

here is another question:

is there any way you can get dw to produce xhtml/css style (code) sites by simply "drawing" and "dragging" objects in the layout "view"?

maybe an "extension"? or through the use of templates?
     
Mooga2
Forum Regular
Join Date: Jun 2003
Location: San Francisco
Status: Offline
Reply With Quote
Nov 8, 2004, 02:33 PM
 
CSS layouts are admirable, but many pixel-perfect designs are hard to implement without using tables or dedicating many hours to compatibility testing between AOL, IE5, IE6, Opera, Mac OS9, Mac OSX, Windows, etc. Each browser has its own flawed implementation of CSS standards and with so many users failing to upgrade their browsers, it makes it hard for me to recommend using it fully (even though my own site uses one). Customers are amost always more interested in compatibility and uniformity than sacrificing a few extra KBs for extra table tags to load.

- Moo!
"He only has one look... it's like I've been taking crazy pills!"
...
     
Thor
Forum Regular
Join Date: Apr 2001
Status: Offline
Reply With Quote
Nov 23, 2004, 01:41 PM
 
FWIW, NN 4 is an 8 year old browser.

What other 8 year old software is being used? (and in the name of Jeebus, why?)

This is like running a Mac with OS 7.6.
     
benandkelley  (op)
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Nov 23, 2004, 02:05 PM
 
Originally posted by Thor:
FWIW, NN 4 is an 8 year old browser.
Sadly, the US Dept. of Education has thousands of users with Netscape 4.0 as their main web browser. It is a frustrating experience to develop a web site for them.
     
Alex Duffield
Grizzled Veteran
Join Date: Oct 2000
Location: Vancouver
Status: Offline
Reply With Quote
Nov 24, 2004, 01:32 PM
 
The poll was missing one option.

Both.

I use tables in my layouts, but as sparingly as posable.

I do not set any attributes on a table instead apply styles to the cells.

I think CSS is a God send, but I am also a realist. The fact that you have to use javascript and a dozen different workarounds to get a CSS layout working cross browser just goes to show it is not there 100%.

I make sure all my code fully validates and looks consistent (as posable) on all browsers and OSs (NS4 excluded.. NS4 users are used to seeing broken sites)

I found this to be a great read on the subject.
Alex Duffield
http://www.incontrolsolutions.com
Fatal error: Call to undefined function: signature() in /usr/local/www/htdocs/showthread.php on line 813
     
DUNSEL
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status: Offline
Reply With Quote
Nov 24, 2004, 01:39 PM
 
I use both. Tables are still the quickest and easiest way to get round cross browser issues, but pure css positioning is definitely more powerful. But it takes more time, because there are more parameters to tweak, and cross browsers issues come to the fore far more in that endeavor.
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
     
daimoni
Occasionally Quoted
Join Date: Apr 2001
Location: San Francisco
Status: Offline
Reply With Quote
Nov 24, 2004, 06:57 PM
 
.
( Last edited by daimoni; Nov 25, 2004 at 12:51 PM. )
.
     
timmerk
Mac Elite
Join Date: Jan 2001
Status: Offline
Reply With Quote
Dec 17, 2004, 12:03 AM
 
Originally posted by benandkelley:
The other day I was in a bookstore and looked at "Designing with Web Standards" by Jeffrey Zeldman. Moments later I looked at a magazine that covers web development and graphic design. The two sources contradict each other on the topic of using CSS layout or table layout.

Which one do you use? Is CSS layout advanced enough and accepted by enough browsers to be used everywhere? ESPN thinks yes, but the US Gov't thinks no, and many news sites are using tables but are considering CSS.

Is it time to make the jump to CSS, or is it better to wait a while?
What are your thoughts?
My thoughts? Kill yourself.
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Dec 17, 2004, 12:29 AM
 
Originally posted by timmerk:
My thoughts? Kill yourself.
Computer thez nohhh...
     
Phil Sherry
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Dec 17, 2004, 05:05 AM
 
Originally posted by timmerk:
My thoughts? Kill yourself.
there's no call for that in this forum. abuse reported.
     
benandkelley  (op)
Junior Member
Join Date: Sep 2004
Status: Offline
Reply With Quote
Dec 17, 2004, 01:29 PM
 
.
( Last edited by benandkelley; Dec 17, 2004 at 02:53 PM. )
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Dec 17, 2004, 04:06 PM
 
Originally posted by DUNSEL:
I use both. Tables are still the quickest and easiest way to get round cross browser issues, but pure css positioning is definitely more powerful. But it takes more time, because there are more parameters to tweak, and cross browsers issues come to the fore far more in that endeavor.
Yeah, I'd like to change my vote to what he (she) said.

Tried a full css layout, the pages got approved, did a few cross browser checks, freaked out, replicated what I had done with tables.

Was for a three or eight page portal type thingy. Had the whole site been html, I would have gone with css, hoping that the learning curve would be steepest at the beginning.
     
mozilla fan
Fresh-Faced Recruit
Join Date: Dec 2004
Status: Offline
Reply With Quote
Dec 17, 2004, 07:26 PM
 
Originally posted by DUNSEL:
I use both. Tables are still the quickest and easiest way to get round cross browser issues, but pure css positioning is definitely more powerful. But it takes more time, because there are more parameters to tweak, and cross browsers issues come to the fore far more in that endeavor.
I agree.
     
Love Calm Quiet
Mac Elite
Join Date: Mar 2001
Location: CO
Status: Offline
Reply With Quote
Dec 18, 2004, 12:50 PM
 
Even in Meyer's "Eric Meyer on CSS", he presents (at least) ONE case where use uses table for layout - just because it's the nature of where CSS support is. (of course it's not a bunch of nested tables!)

:confession of using both:
TOMBSTONE: "He's trashed his last preferences"
     
DeathMan
Mac Elite
Join Date: Aug 2001
Location: Capitol City
Status: Offline
Reply With Quote
Dec 18, 2004, 01:50 PM
 
Wired.com is another high profile site done entirely in CSS. The CSSZenGarden more than proves that anything is possible with well marked (x)html.

Zeldman makes this point in his book:

You don't have to make it look perfect to support it. For example, A website on a phone will (and should) look different than on Firefox 1.0. As long as a site is usable, it isn't as important that it be pixel perfect, and in the case of NN 4, its practically impossible to get pixel perfection anyway.

As it turns out, there are going to be more people winning from an accessible, well made, structured webpage (faster load times, better for screen readers, better for other devices and text browsers) than those that lose by not having perfect rendering in NN 4. Go look at wired.com in NN4 (assuming you even have access to that browser) and see what happens. You can still read it, but there's a little not saying, you should upgrade your browser.

There is no reason not to build pages this way. It can be just as fast, if you can become skilled at it. I'm not quite as fast, because I have only done 4 or 5 sites this way, compared to the 40 or 50 I've done with tables, but I'm close, the tools are great, and the benefits gained from easier to maintain code, and some great CSS tools available now (thanks Jan) it is clear CSS is the way to go.
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Dec 18, 2004, 10:42 PM
 
Originally posted by DeathMan:
There is no reason not to build pages this way.
Full respect (and I mean full) to Zeldman, but DUNSEL's point "Tables are still the quickest and easiest way to get round cross browser issues", has rung true in my humble experience.

[/repeat]
     
Zim
Senior User
Join Date: Apr 2001
Location: Cary, NC
Status: Offline
Reply With Quote
Dec 20, 2004, 01:23 PM
 
I've gotta say that I'm far from sold on CSS for layout.

The cross-browser problems I've seen keep sending me back to tables.

Even a simple 3 column

IMG IMG UL (of nav links)

leaves me befuddled (and often has the items over-lapping)

It is possible? Probably. Is the start-up learning curve steep? Seemingly very.

I'd prefer to do the "right thing", but am not convinced it is in the best interest of my users, at least not yet.

See any of the recent threads I've started on CSS/tables for the reasons why.

Mike

PS. That should make 6 votes for tables, but I see no voting buttons??
     
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Dec 20, 2004, 02:00 PM
 
poll closed
     
mozilla fan
Fresh-Faced Recruit
Join Date: Dec 2004
Status: Offline
Reply With Quote
Dec 20, 2004, 03:23 PM
 
I know this might sound nerdy in regards to statistics but...

It would be interesting to see a statistic of the percentage or sites using tables vs. css for layout. Also, a statistic on what programmers prefer to use. Maybe such a statistic could be gathered every 3-6 months.

I don't know how such a survey could be done, but I'd be interested in seeing the "trend" for web layout stuff as it evolves.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:14 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,