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 trialSaleh Ben Nakhi
7,305 Pointsstructure of elements
I can't understand why there is a gap between the header in orange and the solid red line of primary content as margins were set to 0. can someone explain please?
3 Answers
Matthew Stanley
1,071 PointsI know this is an old question, but maybe this answer will help future students.
The body element has had its margins removed. But that only eliminates the blank space on the outside of the body, the very edges of the page. It does not affect the children of body, such as paragraphs and headers. The other elements have the default margin.
Dylan Young
15,752 PointsNo code to see so i'm not sure, but usually that similar issue can be resolved with additional padding.
Saleh Ben Nakhi
7,305 Pointshi guys, its the exact same code as in the video tutorial. there was no padding and no margins.
tomlorimer
Full Stack JavaScript Techdegree Student 5,803 Pointstomlorimer
Full Stack JavaScript Techdegree Student 5,803 PointsDo you also have some padding?
Posting some code would help us help you. :)