Forum Moderators: open
If the time for CSS layout is now, why are most of the best Web builders sticking to tables? And what about the older browsers still out there? Can they present our layouts correctly?
Currently, I usually set the basic layout with a table, but then use CSS within that table's cells for the rest of the layout. I get good cross-browser results much faster that way, and can focus on strict, validated mark-up. Tables are still valid mark-up, after all ;)
However, just so that SuzyUK doesn't come roaring in from the CSS Forum and pop me upside the head, I will say that the all-CSS-layout folks are amazing, intrepid trail blazers. But I'm just not made for the pioneer life.
Once I got beyond the fairly simple things in CSS and tried doing tables etc, I found I was spending more times trying to find tweaks to fix various browser glitches than I was doing the website.
So for now, I am using what works well, learning the rest as I go along, and hoping that someday it will get better. I have seen some pretty neat stuff done by those really dedicated to it, but I just don't have time trying to tweak every thing to fit all major browsers.
but if backwards compatibility means something in your market
This is a key point. Are you prepared to leave some users high and dry? Even the hardcore CSS'ers often don't bother with anything further back than V5 browsers.
Personally I plan to do all my layouts pure CSS - I take so very few hits (0.01%) with antique user agents older so I feel happy to take this stance, the question is, are you?
Are you prepared to leave some users high and dry?
The short answer is yes.
About a year ago we made the decision to not worry about NN4, IE4, or webtv.
From our site logs those 3 combined made up less than 1% of the total. I would rather spend my time making sure it works right in FF - with some 10-20% of the market - than I would for NN4, with something like .4%.
Others have coded layouts that work in NN4, but I have to admit that I've left version 4 browsers behind. As long as they get a site that works, I'm not particularly bothered if it looks pretty.
The site markup is designed to devolve gracefully without the positioning. So the net result is that we've got a regular, pretty site and a version that works well on the latest gadgets with limited capabilities- and also people on WebTV or IE4.
The CSS forum is a good resource for finding what browsers need what. Also a search for "box model" should net you info about the basic cross-browser problems. Google "CSS-only Filters" for what is perhaps the best compendium of hack approaches.