Four Reasons Why CSS > Tables

Status
Not open for further replies.

kyleirwin

New member
Jun 25, 2006
1,818
32
0
File Size
With one of my sites with a somewhat complex layout, I saw page size go from 60k to only 6k for the on page code. This was done by simply changing from a table-based, to a CSS-based layout. If you run a heavily traffic'd website, with thousands of visitors a day, this can save you huge on hosting fees.

Not only does it save you bandwidth, it also cuts way down on the user's download time per page, which increases the user-experience.

Placement of Content within Code
By using floating block elements (divs), or absolutely positioned elements. You can control exactly where you content shows up in your code, despite where it is displayed to the user.

The advantages of this are arguable in terms of SEO, but has a clear advantage for usability to disabled users or users with text-based browsers.

Code:Content Ratio
By cutting down on your on-page layout code, you increase your code to content ratio. This is another debatable topic, but the less the SE spider has to sort through, the more content from your site it will digest.

Ease of Editing
If you keep all your layout styles in one CSS file (which you should), if you want to change anything on your website, it should be as simple as editing that single file. While if you have a large database driven site with a table based layout, you will have to go though each dynamic page, and manually edit the layout.

Besides the benefits above, you get to display that ultra-cool "VALID XHTML 1.0 STRICT" image on your up-to-date, cutting edge website. w00t!
 


Dave said:
Pretty general stuff, but I guess newbies would like it :p
Yeah, no offence to anybody, but it seems that there is a lot of people heavily into marketing in here... but not as many hardcore coders or SEO's.

I thought just a 'lil newbie info could help out a tit bit.
 
My main reason for switching to css, apart from following the design community, was the ease with which I can change the look of my site by only messing with the stylesheet.

I've never tried doing drastic, css Zen Garden-like changes, though...
 
I would have happily remained CSS-free if it wasn't for the fact that Wordpress templates are riddled with CSS. I learned to build web sites ages ago and, for me, CSS just isn't as easy and doing it old school.
 
WallaceCleaver said:
I would have happily remained CSS-free if it wasn't for the fact that Wordpress templates are riddled with CSS. I learned to build web sites ages ago and, for me, CSS just isn't as easy and doing it old school.

I felt the same way when I first started dabbling in CSS, but after building a few stylesheets from the ground up, I got more comftorable to the point where I can modify most existing CSS templates.
 
I hated CSS for a long time, but love it now. The fact that it saves on bandwidth as well is an added benefit
 
Well, the thing that I will reluctantly admit that I like about stylesheets is that I now don't have to edit hundreds of pages if I want to change the color of one heading or link. That was such a bitch when I had a site with thousands of pages. I can't even count the times that I went through those pages altering little things. That was back in the days before stylesheets even existed.
 
WallaceCleaver said:
Well, the thing that I will reluctantly admit that I like about stylesheets is that I now don't have to edit hundreds of pages if I want to change the color of one heading or link. That was such a bitch when I had a site with thousands of pages. I can't even count the times that I went through those pages altering little things. That was back in the days before stylesheets even existed.
Reminds me of what I had to do before I figured out database driven sites.
 
CSS may seem better from a designers perspective, but as far as it goes for people viewing the webpage, I don't really see it serving a major purpose, I still think CSS has more advantages though, and I prefer to use CSS, except for when it doesn't want to work for me.
 
ITALIA said:
CSS may seem better from a designers perspective, but as far as it goes for people viewing the webpage, I don't really see it serving a major purpose, I still think CSS has more advantages though, and I prefer to use CSS, except for when it doesn't want to work for me.
The time it takes to download the page for the user can be greatly decreased with a CSS-based layout. That's "serving a major purpose" to the user for me.
 
kyleirwin said:
The time it takes to download the page for the user can be greatly decreased with a CSS-based layout. That's "serving a major purpose" to the user for me.

Depends what your website is context to and how it was designed. Tables doesn't guarantee you're going to get slow loading times.
 
The frustrating thing is the way that CSS doesnt work the same in different browsers. That put me off as well for a long while
 
Charlie said:
The frustrating thing is the way that CSS doesnt work the same in different browsers. That put me off as well for a long while
It generally does if you specify a doctype and stick to the standards of that doctype. There are a few bugs here 'n there, but they're easy to work around. It's not like there aren't quirks involved in coding with tables either.
 
Status
Not open for further replies.