Posted By

michellebracken on 08/18/11


Tagged


Versions (?)

Class vs. Id


 / Published in: CSS
 

  1. Use an Id for elements that are used once and only once on a page
  2.  
  3.  
  4. The CSS:
  5. 1 #content {background: #fff}
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Use a class for elements that may be reused on the page
  12.  
  13.  
  14. 1 .large-text {font-size: 1.4em}

Report this snippet  

You need to login to post a comment.