Is there a way to ensure that my navbar stays on top of my background image in bootstrap 4.0 without using negative margin top? I want a solution that is easy to work with even if changes are made to the site.
HTML:
<div class="masthead">
<nav>
<img src="https://test.io/wp-content/uploads/2019/02/testIO-logo-rgb-2.png" class="site-logo" />
</nav>
</div>
<div class="container-fluid hero"> </div>
CSS:
.hero {
height: 600px;
background-image: url(https://s17736.pcdn.co/wp-content/uploads/2019/03/asoggetti-318284-unsplash-1024x684.jpg);
background-position: center center;
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
margin-bottom: 15px;
}
nav {
background: transparent;
background-attachment: fixed;
background-position: auto,center;
}
.site-logo {
height: 64px;
}