I'm trying to make my button take up the full width on smaller screens like mobile devices. Here's what I have so far...
Large Device https://i.sstatic.net/TJex1.png
Medium Device https://i.sstatic.net/Hvkan.png
Small Device
https://i.sstatic.net/JgxuZ.png
For medium to small devices, I want the button to expand vertically to occupy the entire block. I haven't implemented any custom CSS yet, only using Bootstrap defaults. Check out my code snippet below:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aac8c5c5ded9ded8cbdaea9f849b8499">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<header class="p-3 bg-dark text-white">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
<svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap"><use xlink:href="#bootstrap"></use></svg>
</a>
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
<li><a href="#" class="nav-link px-2 text-secondary">Home</a></li>
<li><a href="#" class="nav-link px-2 text-white">Features</a></li>
<li><a href="#" class="nav-link px-2 text-white">Pricing</a></li>
<li><a href="#" class="nav-link px-2 text-white">FAQs</a></li>
<li><a href="#" class="nav-link px-2 text-white">About</a></li>
</ul>
<form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3" style="display:flex; align-items:inherit;">
<input type="text" class="form-control form-control-dark" placeholder="Username" aria-label="Username">
<input type="password" class="form-control form-control-dark" placeholder="Password" aria-label="Password">
<button type="submit" class="form-control btn btn-outline-light" style="margin-left: 1rem!important;">Login</button>
</form>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<button class="btn btn-primary me-md-2" type="button">Button</button>
<button class="btn btn-primary" type="button">Button</button>
</div>
@*
<div class="text-end d-sm-block gap-2">
<button type="button" class="btn btn-warning" style="width:100%; display:block;">
Sign-up
</button>
</div>*@
</div>
</div>
</header>