WordPress Themes and Tables, Shock, Horror

wordpress-theme-tablesHaving recently been taken to task by a punter who berates our poor suffering HTML designer for daring to use tables in some of our WordPress themes, maybe best not to say which ones…

There does seem to be an attitude that tables = evil, without even stopping to think.

Our correspondent has missed the point. The reasons for not using tables in global layout are well-established now and pretty much taken as read. In 2002, the debate and revolution was common currency. It may well be that someone coming to the discipline a bit later on, won’t be entirely clear about the principles of table-less design, when to use, and when not.

There’s nothing intrinsically wrong with <table> as a tag

Where the problems start, when using tables for macro page layout, is that it becomes hard to avoid nesting, tables within tables within tables, messy code – if you’ve ever hacked around with osCommerce, you’ll know how much fun that can turn into. It is also harder, though not impossible in all cases, to get the markup semantically correct. (There’s nothing ‘unsemantic’ about a table, that a div magically cures).

But we’re talking about lower down in DOM, as it were…

If you want three boxes in a horizontal line, then a table is more likely to do the job effectively than floating three divs – a table clears itself, you have as much (perhaps more) control over heights, both of the start point, and relative between each box – and once you get the hang of the slightly peculiar CSS declarations that go with the TD tag, it seems a no-brainer. You see enough examples of broken-layout pages that haven’t been checked for widths in all screen resolutions, with their floated divs heading south to know that a certain sloppiness can creep in.

So, yes, the tables stay in the themes. You won’t ever see a theme here laid out using one big table on the page, as used to be, but there’s no reason to throw away a perfectly useful design tool.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • Reddit
  • StumbleUpon
  • RSS
  • Twitter

2 Responses to “WordPress Themes and Tables, Shock, Horror”

  1. nasir says:

    step by step instructions for posting in word press

  2. Sara @ Womens Halloween Costume says:

    Thanks for the free advice, tables have been a problem for me to figure out using xsite pro 2, i have recently moved on to wordpress and found it easier to handle.

Leave a Reply