I have a div where I need to display two elements next to each other: a search input field and the corresponding submit button.
My attempt so far was to achieve this using the following code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="css/custom.css">
<div class="container w-100 mt-4 border-bottom pb-3 h-25 align-content-center" style="box-sizing: border-box;">
<div class="row">
<div class="col-1 position-relative d-flex align-items-center"><span class="mh-100" style="line-height: 1rem">Class20</span>
</div>
<div class="col-7 mw-100 align-items-center position-relative d-flex">
<form action="" class="justify-content-center position-relative m-0">
<input type="search" name="" value="" placeholder="search" class="w-100 align-items-center pl-3" id="search">
</form>
<button class="btn-outline-primary"type="submit">Search</button>
</div> <!--column 7-->
<div class="col-4">
<button class="btn-outline-primary"type="submit">Log In</button>
<button class="btn-outline-primary"type="submit">Sell your stuff</button>
</div> <!-- col-4 -->
</div> <!--row-->
</div>
The use of "d-flex" achieved the desired layout with the search box and button aligned horizontally. However, it created extra white space between this section and the next due to not stretching across all 7 columns as intended. How can I fix this without affecting the placement of the button?