With the advent of CSS-based layouts over the last few years, it might be assumed that the word “table” should be banished from your web design dictionary (apart from those really useful data tables that we should all use for related data).
But no! The release of Internet Explorer 8 will mean that all the major browsers will support the display: table property. Put simply, this allows two or more adjacent elements, for example, <div> or <p> elements to behave as if they were part of a table but without the use of those pesky <table>, <tr> and <td> tags. One advantage of using this method would be when you want two elements to have equal heights regardless of their content; something that is difficult to achieve with other CSS properties. Another advantage, depending on your point of view, is that the use of floats to achieve column layouts would no longer be necessary.
Sitepoint has a great article about the use of display: table and related properties like display: table-cell and has created a typical three column layout demo using this technique.
Well, it’s not quite as simple as that. IE6 and IE7 do not support display: table and their usage is likely to continue for some time to come. In fact, the decline in use of IE6 has been stubbornly slow and IE7 might be around for a few years yet.
Additionally, there are many robust CSS layouts these days. If you are like me, you may well have your own library of layouts that work well in all major browsers. I’m not sure that I want to scrap these just yet.
For myself, I hope to experiment with display: table. If the results look good, I will start adding this to my own projects. However, for client websites, I will probably only use this if I can provide an alternative solution for IE6 and IE7.
ThemeForest sell a range of site templates from some fantastic designers. They also sell some great WordPress themes!
Online invoicing made easy with CurdBee!
» Sign up
Join SugarSync for online backup. Sync your files between Mac, PC and mobile phone. Get 5 GB FREE and up to 10 GB bonus space!
HTML5 and CSS3 for the Real World will show you how to create websites using these new methods.
This easy-to-follow guide covers everything you need to know to get started. You’ll master the new semantic markup available in HTML5, as well as how to use CSS3 without sacrificing clean markup or resorting to complex workarounds. Buy the Book! · FREE Chapters