TwitterTwitter: Broken my Kubuntu build - having to rebuild it from scratch again 1 day ago

3rd
Aug 07

CSS vs tables


I’ve often been criticised for using tables in my website. I only really use them where I’ve found it necessary, but never-the-less, one table is often one too many for some. “Bad design”, etc, etc.

Well, I’m working on a re-design of the Copy+ site and have been attempted to banish tables from the site entirely. All looked well as I tested it in IE. Then Firefox. Oh my. It was a real mess. I tried to sort it, I really did, but eventually became stuck.

A post to discussion board yielded the following answer.. “the top menu ‘catches’ on your logo_box DIV.” The answer is to add “clear: both;” to my DIV.

So I asked how I was supposed to know this. The answer…

Same way as me. You do something, it doesn’t work, so you google it!

I use it so often that I have it defined as a constant in my PHP.

The other thing that I have done is that I get so fed up of fudging inconsistencies between browsers that I now detect the user’s browser and give them an appropriate css file, not a jack of all trades with indecipherable hacks in.

The conclusion… I’m not supposed to realise this. Instead I have to hack about to get the DIV’s right, probably losing sleep and hair in the process.

But, if I use tables I can get it right first time, without any of the above. Hmmm. Guess what I’m now doing to the new site??

Related posts:

  1. Stop Me and Buy One A new year and lots more web work. First of all, and the biggie, is adding on-line ticket sales to the BMTG site. All of...

2 Comments on “CSS vs tables”

  1. Chris

    I can completely relate. I am finding that CSS is extremely powerful and useful, but when it comes to browser compatibility, it can be a programming nightmare. I use tables and css together, to create a crisp, modern yet compatible look.

    It is really the method that best gets YOU from point A to point B. Don’t let others tell you how you should develop your sites. I have developed many sites using tables and many sites using mixes and a few strictly css. The most variation between browsers came from the later.

    http://blog.itrealm.net

  2. David

    Thanks for the response. Glad I’m not the only one.

    I do agree wholeheartedly with out, but I was wondering if I was maybe missing something.

    I feel similar with XHTML. I haven’t yet seen the advantage of it, except that it’s new and shiny, but can break your site with older browsers.

Leave a Reply

All these comments are validated before being placed on the site. I will NOT allow any spam to be shown, I do not follow the links myself and obvious self-promotion of your site is not accepted either.