(Feedback)Margin property isnt explained fully in the new version of HTML

This doesnt need an answer, I just couldn’t find how to send feedback!

So I’m new to programming and started doing the New Responsive Web Design course, everything was right until I came to the Step 51 of the Registration Form project, where if I did margin top, bottom, left and right individually it was fine, but if I did margin: 0 0 0.5rem 0; it wouldn’t work, so I had to check google and forums and I learnt that it’s because margin’s directions are set to top-left-bottom-right, and in the earlier projects I believe it was never told it behave like that, when up to there, all other properties worked like top-bottom-left-right.

Properties such as margin and padding are applied clockwise from top (when you supply four values):

margin: 0 10px 20px 30px;

This is a useful shortcut to applying each attribute separately.

However, there is another shortcut, which acts differently (when you supply two values):

margin: 0 10px;

This applies 0 to top and bottom and 10px to right and left.
The above is shorthand for the shorthand:

margin: 0 10px 0 10px;

True! I read wrong too lol, its not counter-clockwise as I typed it in the OP, but clockwise.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.