I have attempted to encapsulate everything with <div class="bg-wrapper">
, but I am encountering issues with making it cover and display the background across all the elements within the wrapper.
.bg-wrapper {
background-image: url('img/bg-background-jpg');
width: 100%;
background-size: cover;
height: auto;
border: 1px solid red;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<header class="bg-wrapper">
<div class="container">
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="#">LOGO</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">About <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Portfolio</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-md-5">
<img src="img/phone.png" />
</div>
<div class="col-md-7">
<h1 class="display-4">I CAN DO ALL</h1>
<h3>THINGS NOW</h3>
<h4>Your love is a squery button ok with that?</h4>
<p class="lead">
<a class="btn btn-primary btn-lg" href="#" role="button">Sign Up Today</a>
</p>
</div>
</div>
</div>
</div>
</header>
Furthermore, in my CSS file, I am attempting to wrap the navigation and jumbotron with a background image, but encountering difficulty:
Do you have any suggestions on how I can resolve this issue? It is crucial for me to incorporate an image background for the entire content.