Doesn’t the notation for shorthand go property: top bottom left right?
Why is the answer for setting the top and bottom margins to 0 and 20px and the horizontal margins auto margin: 0 auto 20px? That notation is top left right bottom?
Doesn’t the notation for shorthand go property: top bottom left right?
Why is the answer for setting the top and bottom margins to 0 and 20px and the horizontal margins auto margin: 0 auto 20px? That notation is top left right bottom?
Please use the “Ask for help” button in the challenge so we can see your code. It allows us to better answer your questions.
Shorthand properties for margin
and padding
work clockwise from the top (i.e. top, right, bottom, left).
// apply 10px to all sides
margin: 10px;
// apply 10px top, 20px right, 30px bottom, 40px left
margin: 10px 20px 30px 40px;
// apply 10px top and bottom and 20px right and left
margin: 10px 20px;
// apply 10px top, 20px right and left, 30px bottom
margin: 10px 20px 30px;
oooh okay i see. thank you
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.