PDA

View Full Version : CSS2 or Tables?


Goober
01-19-2004, 10:09 PM
I read many articles and have been told many times that it is much better to use CSS for positioning than tables, but on just about every website I view (including the ones with such articles) all seem to use tables. Even major internet softwares like Vbulletin and PHP-nuk etc. all seem to use tables. So if CSS is so much better why arn't people using it as much as tables? And for my last quesition: why exactly is using CSS better?

Roy Sinclair
01-19-2004, 10:27 PM
The reason a lot of sites aren't using CSS is that the poor design methodology of using tables and presentational tags has a lot of inertia from the time when it was the only usable methods because the browser support wasn't there yet. There's a lot of "If it ain't broke, don't fix it" issues (not unreasonable), web developers who refuse to learn the new ways (which is unreasonable), tools which still use the old ways (some obsolete, the rest should be :)) and some people still teaching the old ways which creates more people who are unwilling to learn the new ways.

Why is CSS better: http://www.csszengarden.com/ is a site with a large number of CSS designs that dramatically alter the web page in some really astonishing ways but it has exactly ONE html page. It's purpose is to demonstrate how significantly you can alter the look of an existing web page that's coded using semantic markup simply by changing the style sheet.

The idea behind using semantic markup and CSS is that the markup contains the actual content but none of the presentational information while the CSS contains all of the presentational information. With that division, search engines can index the true content and find the most relevant information without wading through a lot of information that it doesn't need (a side benefit is that by having a higher content to presentation ratio gives an automatic improvement in your search engine ranking). With the presentation information all contained within the CSS and asuming you've used a common CSS file for all the pages in a site (or a part of a site) you can alter the look and feel of all pages within that site simply by changing the CSS. Site redesigns no longer require changing every page in the site.

spufi
01-19-2004, 10:28 PM
Isn't Vbulletin a forum? Forums use tabular data and thus they should use tables. Mind you they could use far less tables... Here's a quick answer to your question...

http://www.hotdesign.com/seybold/index.html

And the longer one is read "Designing with Web Standards." by Jeffery Zeldman. Anybody who cares about making web pages should read it, and it saves me writing out my own ramble on why you shouldn't use tables for layout.

Goober
01-20-2004, 05:16 AM
Cool, that clears a few things up.

thanks :thumbsup:

whackaxe
01-20-2004, 09:40 AM
also, using tables is all good and dandy now, mowt peple view using IE, Mozilla or Opera. but in the futer when more and more devices acces the net, they will need to be able to find the content in all of that code. not something tables are vey good at handling

iKwak
01-20-2004, 10:39 AM
Not enough people would be able to view CSS properly.
Tables on the sae side.

ronaldb66
01-20-2004, 01:27 PM
Not enough people would be able to view CSS properly.
Define "enough". Define "properly", for that matter.

Albeit true that a certain amount of people still uses outdated and obsolete browsers that aren't capable of handling CSS positioning, when the basis of a web page is a sound, well-structured, semantically meaningful document, even without any CSS at all it would still show up and be useable, altough not that pretty maybe.

There's very little reason to assume that people will revert to older browsers in the near future; all the more reason to look ahead, and not back. More and more people will switch to more standards-compliant browsers; applied in a sensible manner, CSS provides all people with a useable page, and most as of yet (and more in the future) with a more or less appealingly styled one.

Sticking to using tables in an inappropriate way out of a false sense of "safeness" will only continue to propagate this undesired practice.

oracleguy
01-21-2004, 02:07 AM
Branching off on the "if it ain't broke, don't fix it thing" you also have to consider that converting to CSS would require a pretty much complete re-write of the site and it takes time before a site will do that. And especially with corporations, it would be hard to justify to people that don't understand how a web page is even coded why they should approve spending time (and more to the point money) re-writing it from scratch when as it is now the page functions.

Trust me in the real world a css based design pays big dividens, I wrote a template for a complete redesign of a site at work using CSS for layout and that design has changed at least 5 different times since then and it was incredibly easy to change it. Server-Side includes and CSS based layouts are where it is at. And luckily enough the template I wrote is now used for several sites as well since it was proven to be so versital.

rswyatt
01-27-2004, 04:16 PM
I would have to agree with all here...

CSS is the way to go. I am so impressed by the ease in which CSS positioning can be implemented that I am designing all future client sites with CSS unless otherwise specified and I am doing a re-write of previous sites to utilize CSS positioning.

I love it, I love it, I love it. :)