Hello there! I'm a beginner in web development and currently working on a small website using HTML, Bootstrap, and CSS. However, I'm facing an issue with the background-image property in my CSS file. I've double-checked the path and the file format, and everything seems to be correct (even when using Brackets IDE, the image thumbnail shows up when hovering over the path). Here's a snippet of my code:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<meta charset="UTF-8">
<title>My First Web Project</title>
</head>
<body>
<!-- NAVIGATION HEADER -->
<div class="header" id="topheader">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container text-uppercase p-2">
<a class="navbar-brand" href="#">MY WEBSITE</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> </li>
<li class="nav-item"> <a class="nav-link" href="#">ABOUT US</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">SERVICES</a> </li>
<li class="nav-item"> <a class="nav-link" href="#">CONTACT US</a> </li>
</ul>
</div>
</div>
</nav>
<!-- BODY SECTION -->
<section class="header-section">
<div class="center-div">
<h1 class="font-weight-bold">Lorem ipsum dolor sit</h1>
<p>Hello we are developing this site</p>
</div>
<div class="header-buttons">
<a href="#">EXPLORE</a>
<a href="#">CONTACT</a>
</div>
</section>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9cecf3ececf9eeb2f6efdcadb2adaab2ac">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
CSS:
*{padding:0; margin:0; box-sizing: border-box;}
.header
{
background: url('../images/background.jpg');
}
I appreciate any help you can provide!