Table Layout (border, padding) CSS vs. HTML

liunx

Guest
I guess I'm old skool and still use nested tables to create a 1 pixel border around my tables. I noticed that nowadays you can specify the border width and cellpadding with CSS to achieve the same result with less trouble/confusion. My question is how compatible is the CSS version? It's probably more reliable to use a nested table but if I go with the CSS version will I run into a lot of problems with older browsers or are most people using up-to-date browsers that will parse the CSS additions? Thanks for your input.

RichThere are indeed browsers that won't support CSS. These browsers are VERY old, however, and quite, quite rare nowadays.

The only browsers that I know of that do not have a modern version that supports CSS are browsers for the blind, and Lynx, a Text-Only browser. These browsers don't even support images.

Older versions of Internet Explorer and Netscape don't support CSS, but these browsers, again, are SELDOM used, and if they are, the users are probably getting used to most websites not working properly.

Your best bet is to try and get rid of tables altogether, and replace them with a CSS-based layout - it will cut down on page size, which would make it easier to update the website as well as cut down on loading times. Trust me, when you have dial-up, this DOES make a difference, and a lot of people (me included) can only get dialup.

Using CSS instead of tables will also give you more control over the page, as well as make the page look BETTER.

One last thing: If you use semantic HTML (i.e. deciding which tags make the most sense with what you use them for), those using old browsers might not see an overly pretty site, but they'll probably get a site that works nonetheless.Don't forget that google is blind, too. Proper headers and emphasis catch her eye... proper, semantic coding is good for your ranking, and thus your business overall.Thanks for your replies. I appreciate your help. I'm not used to doing layout with CSS but I may look into it. It seems like just about every major site still uses tables for layout. I've peered into the source code and did a search for table tags and came up with a TON when viewing the source of say Amazon. Anyhow, I'm not sure which way to go yet but I appreciate your feedback.

Thanks again,
Rich<rant>Yes, in the past there was no CSS. Back then, tables were the only way to create an aesthetically pleasing site- a grid to lay your elements out on. So, every WYSIWY(M)G editor and desk jockey set out with tables... using editors, and making their sites "all pretty." Sure, maybe disabled people couldn't access their pages, or anyone who wasn't using their browser with 20/20 vision, but, oh well. Now, with CSS (which has been around for years and years, but because of the glacial speed of the web, it's really only been practical to use it for the past few years), you can have your aesthetically pleasing site without tables. Tables were used for layout because there was no other way to do it- now there is, and the substitute is hell of a lot better.</rant>Tables for Layout is Stupid. (<!-- m --><a class="postlink" href="http://www.hotdesign.com/seybold/">http://www.hotdesign.com/seybold/</a><!-- m -->)
 
Back
Top