9 ms·
or you could just use tables, which are compatible with more browsers, and do something more useful with the time you save.
by axod 18y ago
or you could just use tables, which are compatible with more browsers, and do something more useful with the time you save.
- apathy 18y agohave fun styling those tables for your clients without images
- axod 18y agoYou can apply all the standard styles to tables you do realise. Look at the css, and it's just all a bit ugly with the work arounds for browsers.. A little hacky. Also what if you want 4 columns? or maybe you want one of them a fixed width... Sure, with the next version of css, tables will be eaiser to do with just css, but now it still seems like a hack to me.
- mrkurt 18y agoTables would make that not work so well on, say, an iPhone. The way it currently works, the "content" column is going to be the first thing visible when the browser's not wide enough to fit all three.
- wvenable 18y agoTables render better on mobile browser than pure CSS layouts. Mobile browsers are very smart about tables and almost always do the right thing. CSS is just too complex to get a good result when you need to scale down to a small screen.
- boucher 18y agoMobile Safari handles CSS based layouts just fine.
- mrkurt 18y ago...sometimes. When you put three cells next to each other in a table, you're telling the user agent "this is a row of related data". It's difficult to intelligently choose how to lay those out if there's not space for them to appear side by side. That CSS layout leaves a bit more up to the user agent. The primary content appears first, if there's not space to position each column next to the primary content, it drops down below.
- babul 18y agoThe whole reason the movement away from tables began is because complex layouts (nested tables) do not render correctly in different browsers and it does not separate style from content like CSS does. Tables also makes it harder for crawlers/interpreters to understand the page as content may not be hierarchically correct due to layout issues, etc.
- wvenable 18y agoIf you use tables, you don't have to avoid CSS. They compliment each other. I agree that nested tables are ugly, but they're also completely necessary now because of CSS. Using tables to render your main multi-column layout wouldn't require any nesting. Also, tables are more likely to render in different browsers (including mobile browsers) than a complex CSS layout. Given the number of CSS hacks and extra HTML tags in exactly the right order that is necessary for most column layouts the end result is almost always less complex with a table.
- billroberts 18y agoIE and FF handle column widths in tables rather differently, which can cause some problems with table based layouts. I've been round this circle recently and ended up back with a 'pure' CSS approach
- babul 18y agoTables should really be used for data that requires it e.g. number sets etc., and not for layout. True, using tables for layout in some sites is much simpler than CSS but people who do that usually do so today because they do not know how to do it in CSS properly. Either way, all is fine, until they start using tables within said layouts (e.g. for number sets or even more mutli-columning in subsections) and things start to get problematic. This is especially evident when they try to use the content in various sites or try to change formatting for cross-browser related issues (often best solved by having base style sheets for various browsers). Just my experience and thoughts, ultimately use whatever is best for you, and you are comfortable with :)
- thaumaturgy 18y ago