Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

jason limmm
jason limmm
8,009 Points

margin top not being applied

here is my snapshot:https://w.trhou.se/weuw7n1g7o

for some reason the margin top of my form class is not being applied and i checked the chrome dev tools and it says that it is being overlapped by something else i don't know what is it.

1 Answer

Rohald van Merode
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Rohald van Merode
Treehouse Staff

Hey jason limmm 👋

You're overwriting this style in the same rule on line 17 with: margin: 0 auto;. The margin property is a shorthand for all sides combined. In how you've used it you're setting the top and bottom margins to be 0 and use auto for either side of the element.

Hope this clears things up.