I am struggling to align the brand and dropdown menu on the right with the content of my page. My goal is to have a single column for the content, taking up col-8 on larger devices and col-12 on smaller devices. I want the navbar and footer to always be 100% width (in terms of background color), but the content within the navbar should match the width of the rest of the page. Despite trying different options, I have not been able to achieve this successfully.
When I look at the result of my code, I see that the "Brand" text is not consistently aligned with the "Some text". Similarly, the "X" text is not in line with the design I had in mind. I have attempted to rearrange the row/col/container elements, but it seems that the CSS properties of the "nav" element are inhibiting my desired layout. As a Bootstrap novice, I acknowledge that I may have misunderstood some concepts here
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b9dbd6d6cdcacdcbd8c9f98c978b978a">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div class="row">
<div class="col">
<div class="container mx-auto pt-5">
<div class="row">
<div class="col-12 col-md-8 mx-auto">
<nav class="navbar bg-body-tertiary fixed-top">
<div class="container-fluid">
<a class="navbar-brand">Brand</a>
<div class="nav-item dropdown">
<a class="nav-link" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
X
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<div class="row">
<div class="col-12 col-md-8 mx-auto">
<div class="row">
<div class="card border-light mb-3">
<div class="card-body">
<p class="card-text">Some text</p>
</div>
</div>
<footer class="bg-light text-center fixed-bottom">
<div class="text-center text-secondary p-3">
Footer
</div>
</footer>
</div>
</div>
</div>
</div>
</div>
</div>