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

every time i separate the iframe from the header using margin-top:, the header padding expands,

every time I separate the iframe from the header using margin-top:, the header padding expands, it makes the website ugly

here's my code:

https://w.trhou.se/ppru2xt25k

1 Answer

This is probably a good time to hit F12 on Chrome or Firefox to see what the margins/padding are and where they are coming from.

I see that normalize.css is putting wide margins on some of your elements, like the ul and h6 in your header. Because they are nested inside one another the margins are compounding into a ton of space. You probably want to override those in your main.css to more reasonable values.

And how would I do that