I've been in involved in the div V tables debate a few times and it's mostly each to their own. Some people code in tables because it's quicker for them, others code using css because their more experienced at it etc etc. Long term, div's are a better bet but it's the end result that really counts. In my eyes it really isn't the code which is important as so much the finished article, customers buying CD's through ebay didn't notice the missing doctype or the 187 validation errors the homepage throws up, but it's one of the most successful sites out there. If it can be coded neatly and it validates it's a bonus, but if it doesn't and it sells bucketloads, then either way it's fulfilling it's purpose.
I say i would use DIV for the layout and Table for content organization such as the newspaper in your leftframe navigation pannel. Anyway they are completing each other, there is no bad or good things between those 2 way of designing. I use both BUT i tend to use more the <div id="wazupp">true</div>
Div are specifically used to build your website. Tables are only used to show datas, for better visibility. Plus, div make the source code less heavy.
Both have their uses and should be used appropriately. The issue is that we have gone from one extreme to another where people are now using divs in the same inappropriate uses as tables were once commonly used. Have shown a few designers the impact of their divs when their site is used with programs for people with visual impairments.
Ah Christ, the old debate AGAIN. My theory is this: There are only FIVE good reasons to use a table instead of DIV's 1) You MUST have your columns reach full height because faux-column techniques won't cut it or end up too big code-wise. 2) You MUST have vertical positioning middle or bottom of dynamic height content. 3) You need to use floats inside your columns in a way that is messing up your layout. 4) Your layout is so complex that using DIV's ends up two or three times as much code as a table (which I've seen people do) 5) It's a table of data - aka like an excel spreadsheet That's it. Vary from those, /FAIL/ at life. Part of the problem is the overuse of tables, AND the overuse of DIV. Too often you see people doing REALLY stupid stuff like using a table around one cell - or a table for a column of cells with no heights declared all aligned top.... or table in a table in a table for just three or four actual 'elements'. ... and when you get those people onto the anti-table mafia bandwagon what do they spit out for code? <div class="center top clear"><span class="header"><p>Sometext</p></span></div> and if you don't know what's wrong with that, do the world a favor, back away from the keyboard and go make a macrame hammock. Classnames should say what something is, not how it appears, there is no need for the extra SPAN, SPAN is a inline element you cannot put block levels like P inside them... and the whole malfing thing should probably just be a H2 tag. <h2>Sometext</h2> I swear, some of the code people vomit up. I see one more: <div class="menu"> <ul> <li>menu item 1</li> <li>menu item 2</li> </ul> </div> Where the only thing the outer div is not used to apply any styling that couldn't be applied directly to the UL, I'm gonna backhand somebody. Thing is, the anti-table mafia IS full of **** most of the time as many of their excuses - render time (oh yeah, adding 3k of CSS really makes that page load faster. If a 386 running Win 3.1 can render a table, I'm NOT worried about render time), clarity of code (It's called the tab key, USE IT), overuse of inline styling (so use classes JUST like you would for DIV's), Cannot do SEO (put a empty TD at the start, make your next two rowspan="2", put the first column last) - All bullshit claims. The only arguement that holds ANY weight is the ability to rearrange the columns regardless of source order - something that shouldn't be an issue if you bother to learn how to use SSI's in the first bloody place. You can make clean reasonably semantic layouts in tables just as easily as you can DIV - in a number of ways they are simpler, but again lack the ability to rearrange the columns JUST from the CSS. Bottom line, DIV layouts and TABLE layouts are just tools - use the one that is simplest and least code for the task at hand. There's a lot of bullshit advice out there, and the trick is to glean the facts from the snake oil.
Using divs for structure and tables for tabular data is most sensible to me. Using a table for structure just seems like a lazy way to get something just thrown up on a site.
Some discussions never die - still see CD -v- vinyl debates on music forums. I am just impressed someone actually searched for the topic rather than posting a new thread
Which is probably why it was done - because believe me if someone had started a new topic about this, you'd get some jackass linking to this topic and saying "Use the search stupid"... just as you get the people complaining about the bump. It's REALLY annoying on forums as thanks to long term members at most sites you end up damned if you do, damned if you don't because SOMEBODY will complain either way.
It is very simple: If you have to repeat same layout at many places use CSS else if you have to write a small localized which you are never gonna modify use tables.. css is more like object oriented
Well I never use table to layout my sites, But I try not to use DIV too - instead I use more semantic tags like H1..H6, UL, OL, Em, Strong, Etc'.
I think both <div> and <table> can be used in unique ways . Personally i use both all the time or either depending on what iam designing.
In situations like this, I think it is important to remember the reaon for which tables were created in HTML. They were created for the organization of figurative data. DIVS are and always will be the only building blocks in terms of web design for me.
dont discriminate use both together ;-) <table> <tr> <td class="class_name1"> <div class="class_name1"> </td> </tr> <tr> <td class="class_name2"> <div class="class_name2"> </td> </tr> </table>