My attempt to align two elements in HTML using Bootstrap is not yielding the desired outcome. Here is the code I am currently using:
<div class="row align-items-center">
<div class="col-auto">
<h6>Alignment Testing</h6>
</div>
<div class="col-auto ml-auto">
<div class="input-group">
<span class="input-group-text" id="basic-addon1"><i class="bi bi-search"></i></span>
<input type="text" class="form-control" placeholder="Alignment Testing" aria-label="Username" aria-describedby="basic-addon1">
</div>
</div>
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c6a4a9a9b2b5b2b4a7b686f2e8f3e8f5">[email protected]</a>/dist/css/bootstrap.min.css" >
Here is an image depicting the issue.
Changing the class from "items-align-center" to "items-align-start/end" results in a slight position change of the text (h6). Interestingly, when I used "items-align-center" in other sections, it worked perfectly. Could this be related to the height of the div as some discussions suggest? I have already attempted to set a height with no success in aligning to the center.
Any thoughts or suggestions would be greatly appreciated.