I know it can be a pain to style a website with divs, but putting presentation inside HTML is definitely worse.
I know it can be a pain to style a website with divs, but putting presentation inside HTML is definitely worse.
There are more important things to work on :)
For example say you're doing something in PHP and you have a function that spits out a table, then for one of the cells it calls another function that spits out a table.
That is pretty manageable in terms of maintainability, and ease of changing things.
Put a colspan or rowspan in your html and you've coupled your design/layout to your markup. Still though, it is often easier to make this compromise.
The hope here is that we ultimately get the best of all worlds. Easy grid layouts AND markup/presendation decoupling AND strong semantics.
jQuery's John Ressig may speed up the day that comes: http://github.com/jeresig/sizzle/tree/master http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will...
That being said there's a few very good reasons to use a pure CSS design.
More accessible: Specifically I'm thinking mobile phones and alternative stylesheets where "turning off" a table cell completely breaks the design. This is a breeze with pure CSS
Smaller File Size: Generally speaking, a site designed with CSS is smaller than a site designed with tables
Efficient Caching: External stylesheets will cache speeding up response time for the user. For an eCommerce site every second is key.
SEO: Some may argue with this, but presenting important content first is just one of the many factors involved with on-page SEO. This is accomplished quite easy with CSS and absolute positioning.
Faster Updates: I find updating a CSS design to be much quicker than a design nested with tables. Want to completely change the look of your site? Modifying only the CSS you can get some impressive results (http://www.csszengarden.com/).
For a programmer the time spent ironing out the initial kinks can be spent better elsewhere. But for designers its necessary in this day and age to use and understand table-less designs.
Show me YOUR site, and how it can be completely changed with just a flick of the CSS switch and I'll be impressed.
Most (arguably all) CSS designs are built to accomplish 1 layout and 1 design.
Now, for more simple changes, like fonts, colors, and small layout changes CSS is the tits.
11 totally different layouts, all using the same mark-up, all with their own unique stylesheet.
Just because some people find it hard, doesn't mean it can't be done.
Here is my site: http://www.bradjasper.com/
As you can see, even though the header is presented first the the stories are all first in the source. This touches on my SEO point earlier.
Show me YOUR site, and how it can be completely changed with just a flick of the CSS switch and I'll be impressed.
Let's switch the sidebar from the right to the left.
#inner { float: left }
#sidebar { float: right }
Granted that's not completely changed, but its enough of a change to show the effect I'm going for.
If you are using Firefox, you can use the "View->Page Style" menu to select the various stylesheets (all, except for the default one, is a type of April 1 joke).
Also, if you check the source, you'll see that the main content appears first, with the extraneous stuff (navigation, obligatory links, advertisements, etc) appear at the bottom of the page.
I think of HTML like I do assembler it's something for computers to read. I write code that generates HTML, but I don't work at that level. Data, Presentation, Layout, and Binding are all separate parts of the code base.
PS: Some of our site was generating images that users clicked on we then mapped that click back to a location and sent a new image. We updated the Presentation code and it's now using Tables and nothing else changed.