Forum Moderators: open

Message Too Old, No Replies

Do tables create more mark-up baggage?

         

website

4:36 am on Mar 30, 2005 (gmt 0)

10+ Year Member



Do table cells cause unessesary weight? I am under the impression that a liquid website is the best possible type of website to make for a number of different reasons. Does a liquid site take up less room as well? If so is there a way to simulate a table using css?

thank you

BlobFisk

9:19 am on Mar 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi website,

The size of the page is slightly influenced by the tags... A table requires opening and closing table, tbody, tr, td tags where CSS uses an opening and closing div tags. However, this is a few bytes difference so is negligible. The real win is that the pages will render slightly quickly with <div>s as the browser needs to parse the whole table to work out how to render it.

Check out the CSS Forum [webmasterworld.com] for tips and techniques on how to achieve layouts using CSS rather than tables.

HTH

website

5:48 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



thank you very much for the insight, i just needed to know in which direction to swerve.
If this is the case though, why do some web developers stick die hard to a non css website? are there any known benefits to this?

BlobFisk

6:59 pm on Mar 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Browser compatibility would be one, I'd guess. CSS based layounts require a little more effort to make them look the same in different browsers. Table based layout is tried and tested and works cross-broweser (it's not the correct use of tables, as tables are for tabular data!).

website

1:31 am on Apr 1, 2005 (gmt 0)

10+ Year Member



wont newer versions of browsers fix this though? you would think that css is important enough nowadays to be worth the broswer devs to do right on their browser.

buckworks

2:05 am on Apr 1, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Here's another reason div's can be more streamlined: In the page-building program I use, the software indents the table code, and the more nesting is going on, the more things are indented. The indents make it easier for human eyes to identify what's going on in the source code, but it adds up to a lot of extra white space that doesn't occur when I use div's.

website

2:17 am on Apr 5, 2005 (gmt 0)

10+ Year Member



yes, that does seem to be of value. As far as what experiance can tell, does a site with half css and half table cells seem to lack more than if you were to design with just one type in mind?

tedster

5:57 am on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tables can be styled with CSS just as well as divs - so it's really tables versus divs, not tables versus CSS.

We went from a tryout of all-div design (about a year ago) to using a hybrid approach today. We use a container table for the layout's "frame" and then we use divs within that frame. This gives us faster production times and much more certain cross-browser compatibility.

The results doen't seem to lack anything that I can see, and the clients report strong results on their bottom line metrics.