I'm currently working on customizing a container with a form inside, and my goal is to make the background of the form transparent so that the set background image is visible. However, I'm facing issues with applying Bootstrap colors and opacity to this container. When I try using classes like bg-opacity-50 and bg-color-white, it doesn't seem to have any effect. Below is the code for both my navbar and the form within it.
<body>
<a href="https://getbootstrap.com/" class="d-block px-3 py-2 text-center bg-dark text-bold text-white old-bv">Next Upcoming event is April 1!</a>
<!--NAVBAR-->
<header class="navbar navbar-dark bg-dark flex-column flex-md-row bd-navbar ">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<form class="d-flex mt-1 mb-1" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<i class="fas fa-search btn btn-success" type="submit"></i>
</form>
<!--<a class="navbar-brand" href="#"></a>-->
<div class="offcanvas offcanvas-start text-bg-dark " data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasDarkNavbar" aria-labelledby="offcanvasDarkNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasDarkNavbarLabel">Navigation Menu</h5>
<button type="button" class="btn-close btn-close-white text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu dropdown-menu-dark">
<li><a class="dropdown-item" href="#">This Event</a></li>
<li><a class="dropdown-item" href="#">Past Events</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">People</a></li>
</ul>
</li>
</ul>
</div>
</div>
</header>
<div class="container-sm p-4 g-3 ">
<div class="text-center row justify-content-center ">
<h1 class="h1 ">
Valentines Day Event!
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-hearts" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M4.931.481c1.627-1.671 5.692 1.254 0 5.015-5.692-3.76-1.626-6.686 0-5.015Zm6.84 1.794c1.084-1.114 3.795.836 0 3.343-3.795-2.507-1.084-4.457 0-3.343ZM7.84 7.642c2.71-2.786 9.486 2.09 0 8.358-9.487-6.268-2.71-11.144 0-8.358Z"/>
</svg>
</h1>
</div>
<hr>
</div>
</body>
While trying to style it, I used
background: rgba(0,0,0,0.5); color:aqua;
However, this resulted in changing the text color in my form inputs. I also experimented with
background-color:red;
which successfully changed the color but only affected the middle section where my form is centered, leaving white columns on either side. Is there a way to remove these columns or is it not possible with a Bootstrap 5 form? My expectation is for the form to occupy the space in the middle of the page without stretching across. Additionally, I want the background to be visible on the sides and slightly visible through the transparent form in the middle. I've shared the background CSS below in case it's related to the issue.
html {
background: url('img/HeartEyesEmoji.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}