Currently learning about bootstrap, I am in the process of creating a hero section for my website. My goal is to have the background image in the hero section take up 50% of the webpage on large screens, but switch to 100% on smaller screens.
I suspect the issue may be related to setting the height to 50vh. I am unsure of what to adjust in the bootstrap section to make the height change to 100 when the screen size is small.
Any assistance would be greatly appreciated!
.bg-image {
width: 100%;
height: 50vh;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-image: linear-gradient(to bottom, rgba(118, 118, 121, 0.432), rgba(82, 76, 80, 0.73)), url('https://via.placeholder.com/800/ff0000');
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/emailprotection" class="__cf_email__" data-cfemail="b2d0ddddc6c1c6c0d3c2f2879c839c81">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div class="bg-image p-5 text-light ">
<div class="container text-center pt-5 h-100 ">
<h1 class="m-5">I Need Help </h1>
<button class="btn-primary rounded-pill">Book Us</button>
</div>
</div>