Loading ...
Sorry, an error occurred while loading the content.

6854Re: [NH] css coding

Expand Messages
  • Scott Fordin
    May 7, 2010
    • 0 Attachment
      In CSS syntax, "#" is an id selector, and is used for a single unique
      element. By contrast, the "." is for class selectors, and are typically
      used multiple times on a page, often across multiple or groups of
      elements you want to have share some common characteristics. To put
      it another way, id selectors (#) are used for creating unique,
      referenceable elements on a page, where as class selectors are used
      for creating style definitions that can be reused among different

      You might want to take a look here for more information:


      Hope this helps,


      Brother Gabriel-Marie wrote:
      > Hello, y'all!
      > I just recently started to understand what the id attributes are for in
      > the html code. But what is the difference between using
      > tagname#something and tagname.something?
      > body#subpage {background: #eeebe9 url(images/bg_alt.jpg) repeat-x;}
      > body.subpage {background: #eeebe9 url(images/bg_alt.jpg) repeat-x;}
      > Thanks!
      > - Brother Gabriel-Marie
    • Show all 10 messages in this topic