Let's say I have a container with an input search field. My goal is to position a select dropdown right below the search input, ensuring that the dropdown has the same width as the search input (similar to autocomplete functionality). Here's what I've attempted so far:
<div class="container position-relative" id="wrapper">
<div class="row mb-3">
<div class="col">
<div class="row float-right mr-0">
<form class="form-inline">
<div class="input-group">
<input class="form-control ml-sm-2" type="text" id="searchUser" placeholder= "Search by Name or Username...." aria-label="Search">
<span class="input-group-append" id="searchBtn">
<div class="input-group-text bg-transparent"><i class="fa fa-search"></i></div>
</span>
</div>
</form>
</div>
</div>
</div>
<div class="position-absolute" style="width:400px; z-index: 1; right:0; top:45px; ">
<div class="form-group">
<select multiple class="form-control" id="exampleFormControlSelect2">
<option>1</option>
</select>
</div>
</div>
</div>
Does anyone have suggestions on how to make this work?
Here's what it currently looks like: