Okay, there are lots of people pro or contra tables or divs.
Lots of people say tables are for tabular data only and divs are for layout. Both have their uses and issues.
There's nothing wrong with using tables for layout. Search engines and spiders don't care one way or another. Neither do your visitors.
I made already a few websites and some with tables, some with divs. (I don’t want to mention the frame websites I made ages ago, did I just mention…) But I couldn’t go all the way I wanted with divs.
Some people say “tables” versus “css”… but it’s “tables” versus “divs” because you can specify tables with css too.
The layout of both divs as well as tables you can define in external css files.
For some more complex things I tried, tables give me the right results cross-browser, while divs always look different. This when using normal webstandards from W3schools. Besides, you can mix both tables and divs and spans and… together.
If you see sites like this:
http://www.komettails.net/ you see you can make pretty websites with both techniques. But I rather prefer tables, you can specify menus more specific for backgrounds.
Using multiple css files for different browsers and a javascript to detect the browser is definitely not the solution. The reason why I use css is that I only have to change 1 file, and not 1 per browser.
Some say: “divs offer more flexibility, u can change the layout of the complete site by just changing a few things in the css!”
But for me, it’s lots more puzzling to get it right with all browsers and I never get it specific where I want. Flexible and userfriendly… hmm.
In contrary, with tables, you have a layout in normal flow that you can’t change quite flexible out of the static structure. But, if you have a good layout for 1 website, you’re not going to change it totally every 2 months… So when you made a good website, you keep it that way and it mostly lasts for a long time… you’re mostly making a new layout when you’re making a new website.
Some people say the page loads very longer with tables… well, for small websites, that few microseconds don’t bother me nor my bandwidth, and there’s not much more code for the tables I use.
For my website I used some tables to create a raw construction. Not hundreds of tables nested in each other.
Some other things to mention:
- div overlappings
- nested divs give bugs for background-images in FireFox
- no problems with floats
- no problems with clear
- no problems with vertical-align and height problems
- no problems with positioning
- no problems with white space
- browser incompatibility
- …
It’s supposed to be good for layout… of course you can handle it properly when you have a basic website with a basic design and layout. But there are lots of problematic situations to conquer when you want some more specific personalised complexer website.
I know divs can have advantages, but I don’t want to do lots of workarounds or hacks to avoid stupid problems.
For some people like me, it’s faster to design in tables. How ‘bout you?
So some are pro, some are contra. Discuss here!