Posted By

michellebracken on 12/25/10


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

michellebracken
superyahman
abbyabigale


Multiple classes, one DIV


 / Published in: HTML
 

  1. <style type="text/css">
  2.  
  3. .column {
  4. in this class you can add height, width, text characteristics
  5. anything you want to be universal meaning apply to more then
  6. one div layer, remember the "column" class can be changed to
  7. whatever you want.
  8. }
  9.  
  10. .one {
  11. this can be the CSS for a more specific column, for instance
  12. you can add a specific position that only applies to this
  13. div layer and not the other "columns"
  14. }
  15.  
  16. .two {
  17. this can be the code for a mose specific column, for instance
  18. you can add a specific position that only applies to this
  19. div layer and not the other "columns"
  20. }
  21.  
  22.  
  23. <div class="column one">
  24. Contents of column one, notice the space between "column"
  25. and "one" this applies the CSS of both divs to this one.
  26. </div>
  27.  
  28. <div class="column two">
  29. Contents of column one, notice the space between "column"
  30. and "two" this applies the CSS of both divs to this one
  31. </div>

Report this snippet  

You need to login to post a comment.