January 24th, 2004, 07:44 AM
HTML Tables vs. CSS
Hello, I am beginning to venture into the world css and must say I really like it. I am curious about something though. A lot is eluded to insofar as the replacement of tables in html using positioning with css. Are tables bad for some reason? I am very curious as to this issue.
Today the world, tomorrow the universe...
January 24th, 2004, 08:11 AM
Why are tables 'bad'?
Not all browsers render them the same.
You often need tons of code to force the style you want.
Why are positioned div's so good?
Easy to code.
Use CSS (So good for XHTML and XML)
Cross browser friendly (although beware of a bug in IE that sometimes renders borders wrong).
It is only a matter of time before XHTML becomes standard, and soon after then XML (XHTML rules are, in effect, a subset of XML).
Most designers shy away from positioned div's because fot he difficulty of designed a 3 columned layout where all the columns are the same height, because normally they would only be as high as each column's content dictated.
This site (mine) shows how to get round this problem and will make your code for you. Up to 3 columns, header and footer, borders, background colors, all done. Choose the widths and left or centered:
"Good artists copy, great artists steal." Pablo Picasso
January 24th, 2004, 08:28 AM
Tables are really for tabular data, so they should still really be used for anything that you would put into a table if you are using a word processor or writing something on paper. Divs are a lot nicer, not only because of the reasons mentioned above, but I for one like them as it allows me to put every single bit about the look of a site into one file, so if I want to change the look throughout a site (though nothing ever leaves my computer, so it is a little pointless in a way), there is only one file to change instead of having to go and redo tables.
January 24th, 2004, 08:46 AM
Hey guys, thanks so much. Your replies were excellent and just what I need to hear. Thanks.
January 25th, 2004, 12:00 AM
CSS layouts also have the advantage of being viewable on a variety of devices (Monitor, printer, pda, etc.) just by changing a stylesheet.