What I am about to say may be sacreligious in some circles but I feel it can never be said enough. CSS is not ready to be my primary method for laying out pages. There. I said it. I know. By now I expect people are frantically trying to find the comment button to flame me. But follow my logic here. The web community spent 10 years in purgatory fighting the browser wars to come to some consensus around HTML standards that could be used to build a site that looked decent in all current browsers. The development community was tired of the HTML extensions that worked in browser x but not in browser y. We shunned ActiveX controls and forced Microsoft to all but abandon VBScript. I want to write a web page once and have it served and rendered correctly in all major browsers.
About the time the browser wars were in their final stages, it was decided that it would be good to separate our data from the presentation. HTML was given a new X and tweaked to bring it into line with the XML standards. Now I had a format that was easy for marking up data without worrying about how to present that data. The presentation duties were relegated to CSS. CSS was great. You could control almost every aspect of how your data was displayed. You could put it in boxes, and give it pretty pictures and add margins and padding and all sorts of fancy fonts. We were in Nirvahna. But then some idiot went and fired up one of the browsers that were defeated at the Battle of Redmond and the Battle of Mountain View. WHOA! Sparks started flying from the screen. What happened to the beautiful website I just spent weeks building?
I think we're ok. All my presentation logic is in one place. Maybe if we just tweak it a little we can make everything beautiful again. No problem. Hmmm. Where to tweak? I followed the CSS spec exactly. What could be wrong. Maybe if I consult the Oracle at Google, the gods will give me the answers I seek. Ahhhh, the God named Holly has a hack that seems to fix my problem. All is right with the world. Then someone mentions something about this Opera where people go on a Safari to hunt Firefoxes. My head is spinning and my site looks like Crap. Back to the Oracle where I find the God Tantek has another solution. My site is looking great again.
Hey did you hear that the Redmondians have upgraded their armor and are readying a new battle tank. Guess what? All those solutions from Holly and Tantek and a myriad other Gods need to be updated. Hey did you also hear that there is a new CSS standard coming out? It will solve all the problems of the previous two versions of the spec. Of course, between bugs and incomplete implementations, we will spend another 10 years trying to get everyone to support this "standard" before it even approaches useability.
I am tired of everyone telling me to jump on the XHTML/CSS bandwagon. It is a huge waste of my time. Come back to me when you have something that actually works WITH ALL BROWSERS. Until then I will use CSS for window dressing only and will not rely on it to build my whole house. In my opinion, it and the browser manufacturers are just not ready. If you wonder what caused this rant, just look at this simple explanation of clearing floats and it should be obvious to any but the true zealots what is wrong in CSS land. Notice the name of the html title. EasyClearing.html. I am sorry, but if it takes you this long to explain an "easy" method I hate to see what the hard methods looked like.
The state of affairs with CSS is just not acceptable. All the productivity gains we have made in other areas of web programming were for nothing if I have to spend all of this extra effort to make my pages look correct in various browsers.