www.webdeveloper.com
Results 1 to 2 of 2

Thread: different betweeen id & class ?

  1. #1
    Join Date
    May 2007
    Posts
    142

    different betweeen id & class ?

    in css what is the different between id & class. can i use the same id css selector in multiply places. for example, if i have a #box1, can i apply this do multiple layer? will it make validation error?

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    An id can only be used once per page, and is used to specifically identify one particular element on the page. If you want to apply the same styles to multiple elements then you would use a class name. Elements can have an id and a class if you want.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles