Hi there,
The default position of the header is relative to the page. If this is the setup, the mobile menu will push the content down the page when you click on the burger menu.
Since you added the code:
.page .masthead {
left: 0;
position: absolute;
right: 0;
top: 0;
}
this sets the header’s position absolute to the page that is why the page content does not get pushed down and shows up above the content below it.
You can read more about the CSS position property here:
https://www.w3schools.com/css/css_positioning.asp
What I can suggest is that you can set the desktop menu to have an absolute position through media queries then set the background color of the header area to a color close to the top area of the image below the menu. It should be something like this:
@media (min-width: 980px) {
.home .masthead {
left: 0;
position: absolute;
right: 0;
top: 0;
}
}
@media (max-width: 979px) {
.home .masthead {
background-color: #ECF5D8;
}
}
Lastly, notice that I updated .page .masthead to .home .masthead. This is because you mentioned that you are trying to apply the CSS to the homepage only and the class .home is more appropriate to target the homepage.
Hope this helps.