Having trouble with my responsive website setup - the background image for ".hero-image" isn't showing up after adding the navigation. Google Chrome console is throwing a "Failed to load resource: the server responded with a status of 404 (Not Found)" error.
The image file is located at "img/Header.jpg"
I've checked and double-checked my new navigation bar code, but can't find any conflicts. Already verified the file location
CSS
.hero-image{
background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("img/Header.jpg");
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
}
.hero-text{
text-align: left;
position: absolute;
margin-left: 20%;
color: white;
font-family: 'Roboto Mono', monospace;
}
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
nav{
display: flex;
justify-content: space-around;
align-items: center;
min-height: 8vh;
background-color: #343434;
font-family: 'Roboto Mono', monospace;
}
#logo{
height: 100px;
}
.nav-links{
display: flex;
justify-content: space-around;
width: 30%;
}
.nav-links li{
list-style: none;
}
.nav-links a{
color: white;
text-decoration: none;
letter-spacing: 3px;
font-weight: bold;
}
.burger{
display: none;
cursor: pointer;
}
.burger div{
width: 25px;
height: 3px;
background-color: white;
margin: 5px;
transition: all 0.3s ease;
}
@media screen and (max-width: 1024px){
.nav-links{
width: 60%;
}
}
@media screen and (max-width: 768px){
body{
overflow-x: hidden;
}
.nav-links{
position: absolute;
right: 0px;
height: 100vh;
top: 0vh;
background-color: #3f3f3f;
display: flex;
flex-direction: column;
align-items: center;
width: 80%;
height: 100%;
transform: translateX(100%);
transition: transform 0.5s ease-in;
}
.nav-links li{
opacity: 0;
}
.burger{
display: block;
}
}
.nav-active{
transform: translateX(0%);
}
@keyframes navLinkFade{
from{
opacity: 0;
transform: translateX(50px);
}
to{
opacity: 1;
transform: translateX(0px);
}
}
.toggle .line1{
transform: rotate(-45deg) translate(-5px,6px);
}
.toggle .line2{
opacity: 0;
}
.toggle .line3{
transform: rotate(+45deg) translate(-5px,-6px);
}
HTML
<div class="hero-text">
<h1>Ruan Kuypers</h1>
<h2>Websites. Done. Right.</h2>
<h3>A relighable business partner.</h3>
</div>
</div>
Error message: Failed to load resource. The server reported a status of 404 (Not Found)