Hello, I'm making my own theme and I've seen that the default template for Drupal is made with tables. But style manuals recommend to use tables only if you want a table. I want to know why Drupal is using tables instead of divs and if I make a theme based on divs, would it work?

Thank you very much!

Comments

modul’s picture

Sure it would work. Divs and tables are just layout tools, and it doesn't matter very much what you use. And you are right: tables should only be used when you want actual tables, tabular display of information. You can replace the tables with divs - well, "restructure" might be a better word, because there's more to it than just taking the one out and tossing the other in.

yelvington’s picture

You are mistaken. The default theme for Drupal is Garland, and it has no tables.

lolmos’s picture

As others have noted the basic templates for drupal use DIVs and not tables.
what version of drupal are you using?
If you are using 5.xx then i really recommend you start with the Zen theme.
It's designed for people to sink their teeth in drupal. All the code is excellently commented.
I have been learning loads from just that theme.
Unfortunately it's not ready for drupal 6.
3:00

enkara’s picture

I've based my comment in this page: http://drupal.org/node/11812

I think they should change it if garland uses divs (and it's more correct)

Thank you for your help!