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

HTML HTML Forms Choosing Options Select Menus

Ephraim Michael Valladares Cordova
Ephraim Michael Valladares Cordova
2,300 Points

how 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?

Steven Parker
Steven Parker
231,275 Points

To facilitate analysis, post your code (both HTML and CSS).

1 Answer

Tianni Myers
Tianni Myers
10,453 Points

target both elements and set their margin: 0;

Steven Parker
Steven Parker
231,275 Points

But DIVs don't have margins by default, there's probably something else going on that showing the code will reveal.

Tianni Myers
Tianni Myers
10,453 Points

Yeah 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.