Well at least for the next two years
aka a review of Everything you know about CSS is wrong! by Rachel Andrew and Kevin Yank
I just finished reading Everything you know about CSS is wrong! by Rachel Andrew and Kevin Yank. The title was choosen to be controversial, the book is about using CSS tables for layout.
Like most people I have avoided using or even learning about CSS tables for layout, because CSS tables are not supported by IE6 or IE7. Rachel and Kevin argue that because IE8 will support CSS tables you should start using CSS tables now, I disagree.
Are CSS tables ready for prime time?
In my opinion not now and not for at least 2 years.
The first issue I have is that even after IE7 has been out for over two years, IE6 is still a popular browser. IE6 still accounts for 25% to 33% of all Internet Explorer traffic to sites I have statistics for. Which means 10% of all visits to this blog and nearly 25% of all visits to work are done using IE6. So I expect that two years after IE8 is released a similar proportion of 10 to 25% all traffic to a website will be with IE6 or IE7.
Rachel and Kevin recommend that you use build sites using CSS tables and then use conditional comments to provide IE6 & IE7 with a stylesheet that either provides a simplified layout for IE6 & IE7 or uses todays current techniques like floated layouts to provide an equivalent layout. I can not see myself providing a simplified layout for IE6 & IE7 in the next 2 years, while those browser maintain a significant market share, particularly as my bosses all currently use IE6.
I strongly disagree with Rachel and Kevin in providing an equivalent layout using tricks, hacks and floats for IE6 & IE7, while using CSS tables for other browsers. Rachel and Kevin say this will save time, battling browser incosistencies. First you will have to build a site in CSS tables, then build it again for IE6 & IE7 in a totally different way. I believe that would be a waste of time, because the browser inconsistencies usually occur with IE6 & IE7, so if you build it right the first time using floated layouts, you only need to make minor adjustments for IE6 & IE7. Instead of building it once using CSS tables, then build it a second time using float layouts and adjusting for IE6 & IE7 inconsistencies. Build it once, build it well and it will be quicker and more reliable than build it twice.
CSS tables are not a panacea for all layout woes, Everything you know about CSS is wrong! does explain the limitations of CSS tables. If you are an old school hack like me who built sites with HTML tables last century. You will see that while CSS tables have some advantages, they also have disadvantages over HTML tables. There is no colspan or rowspan, so you end up with endless nested CSS tables, when you could the same job with a single HTML table.
Add this to the different browser interpretations of anonymous tables elements and the inability to absolutely position elements within CSS table elements. And you will find CSS table layouts even more bloated than a float layout with extra divs for hooks and as difficult to code or maintain.
Another issue I have with this book is the assumption that the only browsers that can not deal with CSS tables are IE6 & IE7 and everything will be all right once IE8 achieve dominance. What about mobile browsers. While the latest versions of Mobile Safari and Opera Mobile might support CSS tables, how many of the other numerous popular mobile browsers support CSS tables, not IE for Windows Mobile 6.
So is Everything you know about CSS is wrong! worth reading?
If you are a dinosaur still building websites with HTML tables, this book will not make you take the jump to CSS layouts, because CSS table layout are not that simple and you still need to learn about floats, absolute and relative positioning and other fun CSS things. Plus do you really want to build sites that will not look right in a large number of visitors browsers for the next couple of years.
The section of the book that got me excited was CSS3 Grid Positioning Module it is only working draft and no browser has implemented it, but it is the game changer as far as I am concerned for building web pages and if IE8 supported Grid Positioning, I know I would be using it on a regular basis within 18 months of IE8 release, if not sooner. What is offered by CSS tables is minor by comparison.
That is what disappointed me about the book, there is nothing in it that will change how I use HTML & CSS. It got me to think about how I use HTML & CSS, and did add a tool to my armoury, but that is it.