Advertisement
tourniquet

CSS Shortcut

Jul 27th, 2014
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.63 KB | None | 0 0
  1. /* instead of typing four css lines */
  2. padding-top: 0;
  3. padding-right: 20px;
  4. padding-bottom: 30px;
  5. padding-left: 10px;
  6.  
  7. /* we can type only one line */
  8. padding: 0 20px 30px 10px;
  9. /* where first number is for top */
  10. /* second is for right padding */
  11. /* third is for bottom padding */
  12. /* and fourth is for left */
  13.  
  14. /* another example */
  15. margin-top: 0;
  16. margin-right: 20px;
  17. margin-bottom: 30px;
  18. margin-left: 10px;
  19.  
  20. /* replace with */
  21. margin: 0 20px 30px 10px;
  22.  
  23.  
  24. background-color: white;
  25. background-image: url(images/cocktail.gif);
  26. background-repeat: repeat-x;
  27. /* VS */
  28. background: white url(images/cocktail.gif) repeat-x;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement