Vetical and horizontal reversed in CSS?


#1

Hi,

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!


#2

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


#3

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!


#4

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