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 trialZay Myo Tun
5,030 Pointsinline-block UL is moving down along side with inline-block h1 after adding 50px top margin to h1
Hi I am kind of wondering why is inline-block UL is moving down along side with h1 element (both inline-block) after adding 50px top margin to h1 . Does it mean inline-blocks move together when they are lineup ?
Zay Myo Tun
5,030 Pointsthanks for your answer. I just want to know when I add margin to logo(h1), it moved down and the inline-block element navigation bar also moved down and aligned with logo. navigation bar doesn't have a margin so, it should stay where it was. I can't think of reason why it still stay aligned with logo.
Annet de Boer
900 PointsIt would help if you copy paste the relevant html part and your css file, or a link to where it can be found so we can take a look. it's difficult without seeing the code :-)
Zay Myo Tun
5,030 Pointsat 2:03 (adding top margin to .name moved both logo and nav bar).
Annet de Boer
900 PointsAh I see what you mean. I don't really know how this can be explained :-\
I would expect only the name would move lower, not the navbar, just like you expected. Hopefully someone else knows the answer
Annet de Boer
900 PointsAnnet de Boer
900 PointsNo it does not mean inline-blocks move together. What do you want to achieve though? You want them to overlay? Or keep them closer together?