On 11/29/05, Mark Fredrickson <[EMAIL PROTECTED]> wrote:
>
> Here's a general question about CSS that I've been able to quite figure
> out.
> If one has a DIV that will only appear once per page, which should one
> use:
> 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.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to