View Full Version : Stylesheets vs. Tables
mattk
13th December 2005, 14:01
Does anyone know of an example showing a page designed using tables compared against the same page designed using css?
Richard Conyard
13th December 2005, 14:09
To be honest I don't off hand (most people remove the table design when putting the new one up).
If you are after CSS layouts then csszengarden is a good place to start though.
creospace
13th December 2005, 14:11
CSS is better in the long run for general layouts but when adding databse driven content use tables to lay it out.
I agreee then csszengarden is a great place to start learning.
Gary
Coding Monkey
13th December 2005, 15:47
Also, CSS will almost always require less code for layout. It also gives far more flexibility later on for alterations.
However, for tabular data, use tables! Makes sense. They're not evil, just make sure you're doing them properly with descriptions and proper columns
Richard Conyard
13th December 2005, 15:52
Creo,
I'm going to have to disagree on that one. All of the sites that come through my part of the company are database driven, and most are pretty much exclusively laid out with CSS.
It's cleaner, more efficient and it means that less time gets spent on maintenance.
mattk
14th December 2005, 07:37
Thanks for the comments guys. I understand the pros and cons of each, but I'd like to see a comparison of 2 identical pages, written in the different styles.
Might as well just do it myself!
Coding Monkey
14th December 2005, 07:55
I think it's fair to see that using CSS you can position things with far more accuracy and an awful lot less code, but tables will universally work across all the major browsers and look the same in basically every single one. Because of IE6, a lot of hacks are involved for certain elements to be positioned.
Will you find much of a difference in the immediate look of the page? Nope. If you perform huge tests, will you find a different in the loading times? Only slightly. But if you want to change the layout, will you find a huge reduction in the time involved? Definitely
Richard Conyard
14th December 2005, 07:59
Mac, are you on about absolute positioning with CSS (yuck!), allowing your layouts to flow, stretch and shrink is a far better option.
Coding Monkey
14th December 2005, 08:01
Yep, float etc, but even then I find I have to put different widths on elements in IE compared to Safari/Firefox/Opera/AnyOtherBrowserEver
Richard Conyard
14th December 2005, 08:24
That's the ie box model being the wrong way around :(
Coding Monkey
14th December 2005, 09:07
Well, at that stage, I hand it over to a designer and leave them to it, then hug my Mac and let all my worries pass.
IE7 will sooth me