It's hard to say without seeing any of the code, but most likely it's something in your bottom container that has an element in it that has a margin-top. Top margins will reach outside of its container if the container doesn't have any padding.
To get the margin to stay inside, you'll need to add padding to its container. OR, you can remove the top margin of the element that is pushing outside fo the container.
I've made a codepin for you to play with. It has an example of what you're are experiencing, and an example below that solves the problem by adding padding.
https://codepen.io/joshcoast/pen/MGvxgw
HTML:
<div class="bigheader">Some stuff</div>
<div class="content">
<nav class="nav1">
<a href="#">a link</a>
</nav>
</div>
<br>
<div class="bigheader">Another example</div>
<div class="content content-with-padding">
<nav class="nav2">
<a href="#">a link</a>
</nav>
</div>
CSS:
.bigheader {
background-color: #999;
color: white;
padding: 20px;
height: 200px;
}
.content {
background-color: tan;
}
.content-with-padding {
padding: 5px;
}
.nav1 {
margin-top: 20px;
}
.nav2 {
margin-top: 20px;
}
Hope that helps!