border / margin / padding etc.. shorthand order


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

TRouBLe

T - op
R - ight
o
u
B - ottom
L - eft
e


Copy this code and paste it in your HTML
  1. p
  2. {
  3. border-top-style:dotted;
  4. border-right-style:solid;
  5. border-bottom-style:dotted;
  6. border-left-style:solid;
  7. }
  8.  
  9.  
  10.  
  11.  
  12. The margin property can have from one to four values.
  13.  
  14. * margin:25px 50px 75px 100px;
  15. o top margin is 25px
  16. o right margin is 50px
  17. o bottom margin is 75px
  18. o left margin is 100px
  19.  
  20. * margin:25px 50px 75px;
  21. o top margin is 25px
  22. o right and left margins are 50px
  23. o bottom margin is 75px
  24.  
  25. * margin:25px 50px;
  26. o top and bottom margins are 25px
  27. o right and left margins are 50px
  28.  
  29. * margin:25px;
  30. o all four margins are 25px

URL: http://www.w3schools.com/css/css_border.asp

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.