Answers for "margin multiple value order"

CSS
0

margin multiple value order

html, body {
  width: 100%;
  margin: 10px; /* for all 4 sides */
  margin: 10px 15px; /* top/bottom = 10px, sides = 15px */
  margin: 10px 15px 0px; /* top 10px, sides 15px, bottom 0px */
  margin: 10px 15px 0px 30px; /* top 10px, right 15px, bottom 0px, left 30px */
}

/* 
This is pretty much standard for all box-stuff shorthand,
such as borders or padding.
It should be noted that if you use `inherit`, it will only work
if all 4 values are specified.
So, you can't do `border-width: inherit 2px;`.
*/
Posted by: Guest on October-03-2021

Browse Popular Code Answers by Language