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 trialEphraim Michael Valladares Cordova
2,300 Pointshow to get rid of the space between nav and header or two horizontal divs
this is a question out of this video, but i still have problem to get rid of the space that i get between two horizontal divs.
how do it get rid of that?
1 Answer
Tianni Myers
10,453 Pointstarget both elements and set their margin: 0;
Steven Parker
231,275 PointsBut DIV
s don't have margins by default, there's probably something else going on that showing the code will reveal.
Tianni Myers
10,453 PointsYeah seeing the code would help. All I can think of is a negative margin-top for the bottom div or use a wrapper div container and use flexbox.
Steven Parker
231,275 PointsSteven Parker
231,275 PointsTo facilitate analysis, post your code (both HTML and CSS).