5 ms·
About time. Maybe now a lot of people will stop using tables to define the site layout :) I know it can be a pain to style a website with divs, but putting pre
by nocivus 18y ago
About time. Maybe now a lot of people will stop using tables to define the site layout :)
I know it can be a pain to style a website with divs, but putting presentation inside HTML is definitely worse.
- zitterbewegung 18y agoYea like arc . Oh wait.
- axod 18y agoUsers don't care if you use tables for layout. Sure, if you're nesting tables deeply then maybe it's an issue, but this "avoid tables at all costs" is a bit silly. Especially when the equivalent css is longer, more complex and far less compatible. Try doing some complex colspan/rowspan type things in css, with unknown cell widths etc. There are more important things to work on :)
- nocivus 18y agoTrue also, of course, no point in being fundamentalist :). In the end it basically depends on what you want; If you want flexibility to change everything in your site in regular intervals, then I wouldn't advise relying on tables a lot :)
- axod 18y agoWell it also depends on wether your write all your layout by hand and do all that nesting, or if it's just the end product of your code executing. 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.
- nocivus 18y agoAgreed, but if you want a designer to take that layout and change it to something else, I'm betting that he will have a really hard time dealing with PHP ;)
- JoelSutherland 18y agoMy major complaint with a table based layout isn't a semantic one, it is a pragmatic one. 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://github.com/jeresig/sizzle/tree/master http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will-save-us-all/ http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will...
- tomjen 18y agoIt may be true that you mix semantics when you mix tables and html, but you lose little if you do it while you use RoR/Django or any other of the frameworks where there is a central template because you still only need to make changes in _one_ file to affect the hole site.
- Jasber 18y agoInitially switching to table-less design is harder. CSS has its own quirks in every browser that can drive a developer mad. 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/ 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.
- josefresco 18y agoPlease not another advocate that uses CSSZenGarden.com as a reference. It's a great 'proof of concept' but it no longer impresses me or means anything in the real world. 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.
- Jem 18y agoOh, I only wish I was still running my style switcher. 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.
- Jasber 18y agoYes, another advocate of CSS Zen Garden. Its the best available example to display the power of stylesheets. Here is my site: http://www.bradjasper.com/ 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.
- gills 18y agoTable layouts are tougher on users with screen readers. Aside from that I can't disagree with your points.
- Retric 18y agoputting presentation inside HTML is definitely worse 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.