[themes] <div id= vs <div class=

Nat Meysenburg nat at openflows.com
Thu Mar 3 14:54:29 UTC 2011


It is not an either or proposition, you can use both ids and classes on
elements. Generally, it is a good idea to do both. Drupal code by
default does on many things.

In your case for instance you would want something like <div id="menu-1"
class="menu-bar", <div id="menu-2" class="menu-bar".

Then you can do .menu-bar for general styles and #menu-1 for styles
specific to that menu.

Hope that is helpful,
~~nat


More information about the themes mailing list