On 11/29/05, Mark Fredrickson [EMAIL-REMOVED]> wrote:
> Here's a general question about CSS that I've been able to quite figure
> If one has a DIV that will only appear once per page, which should one
> a class or an id?
> Classes are obviously useful at applying to multiple elements, or applying
> multiple classes to one element. What advantages have that classes do not?
> Specificity comes to mind, but the CSS rules regarding this are hazy in my
> mind and I do not know if ids provide more specificity than classes.
ID's are meant to be used once on a page, so you use them to describe a
specific page element. For instance, Header, Navigation, Footer
Classes, are intended to be used to describe elements which are found
multiple times on a page, and generally speaking should be used to
Generally speaking I use divs to position things, and classes to determine
how they look.
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/