CSS * (first style sheet item)


/ Published in: CSS
Save to your folder(s)

what could be placed in the * {} inorder to solve a few common issues


Copy this code and paste it in your HTML
  1. *
  2. {
  3. /* apply a natural box layout model to all elements */
  4. -moz-box-sizing: border-box;
  5. -webkit-box-sizing: border-box;
  6. box-sizing: border-box;
  7.  
  8. /* most images dont want to be repeated */
  9. background-repeat: no-repeat;
  10.  
  11. /* make positioning and element nudging work - remove for ie6*/
  12. position: relative;
  13.  
  14. /* for icons etc */
  15. vertical-align: middle;
  16.  
  17. /* make everything a little more fun */
  18. -webkit-transition: all 0.2s ease;
  19. -moz-transition: all 0.2s ease;
  20. -ms-transition: all 0.2s ease;
  21. -o-transition: all 0.2s ease;
  22.  
  23. /* because all browsers set their own default */
  24. margin:0;
  25. padding:0;
  26. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.