Vetical and horizontal reversed in CSS?


It might seem like a stupid question but it’s messing with my head.

I was going through an exercise, and read this: “top and bottom margins, also called vertical margins”.

I don’t know you, but in my world the line on top is called horizontal, I’m really confused right now.

Thank you!

They’re called vertical margins because they are on the cross-axis, which is vertical. Top and bottom are the vertical boundaries.


I had this exact thought. It seems like the lines going across the top and bottom are moving horizontally, so top and bottom would be horizontal.

Since we’re talking about margin though, the top and bottom margins are measured by being pulled vertically either way. Once I saw it I couldn’t unsee.

Hope this made sense…Much love!

1 Like

Thank you so much it makes a little more sense now :grinning: