I am utilizing Bootstrap's navbar, specifically using the dropdown toggler icon on the right side. I am looking to have a background that only covers the right portion of the width and not the entire width. Any suggestions or insights would be greatly appreciated.
Here are my two attempts:
My desired outcome:
.menu {
font-family: header;
color: white !important;
font-size: 3rem;
background-color: rgba(0, 0, 0, 0.3);
}
.menu-bg {
background-color: rgba(0, 0, 0, 0.3);
}
body {
background: #333 !important;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="781a17170c0b0c0a1908384d5649564b">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<nav class="navbar navbar-dark fixed-top pt-md-5 pe-md-5 pt-2 pe-2">
<div class="container-fluid">
<button class="navbar-toggler ms-auto custom-toggler menu collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> MENU
</button>
<div class="collapse navbar-collapse menu-items" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0 menu-bg">
<li class="nav-item ms-auto">
<a class="nav-link pe-3" href="#features">FEATURES</a>
</li>
<li class="nav-item ms-auto">
<a class="nav-link pe-3" href="#counter">SHARK COUNTER</a>
</li>
<li class="nav-item ms-auto">
<a class="nav-link pe-3" href="#about">ABOUT US</a>
</li>
<li class="nav-item ms-auto">
<a class="nav-link pe-3" href="#faq">FAQ</a>
</li>
<li class="nav-item ms-auto">
<a class="nav-link pe-3 rounded-bottom" href="#">BACK TO TOP</a>
</li>
</ul>
</div>
</div>
</nav>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81e3eeeef5f2f5f3e0f1c1b4afb0afb2">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>