My current issue involves using Bootstrap 5.2.3 to create an input group that displays a set of spans with the ".input-group-text" class alongside inputs with the ".form-control" class. While this setup works well on a computer screen, it does not adjust correctly vertically on a mobile phone.
Below is my current code (attempting to avoid using row/col-sm):
<div class="container">
<hr>
<h5>1st step: Type the valuations criteria:</h5>
<div class="input-group input-group-lg input-group-sm mb-3">
<span class="input-group-text" data-bs-toggle="tooltip" data-bs-placement="bottom"
title="The search will include properties sold within the radius">Radius:</span>
<input type="number" class="form-control" id="radiusMetersId" value=300 min="100"
max="10000" step="100" data-bs-toggle="tooltip" data-bs-placement="bottom" title="(meters)">
<span class="input-group-text">Sale type:</span>
<select class="form-control" id="saleTypeId">
<option value="apartment">Apartment</option>
<option value="house">House</option>
<option value="all">All</option>
</select>
<span class="input-group-text">Sqm:</span>
<input class="form-control" type="number" value="50" min="5" max="100000" step="5" id="sqmId">
<span class="input-group-text">Rooms:</span>
<input class="form-control" type="number" value="3" min="0" max="10" step="1" id="roomsId">
</div>
</div>
I have included the following headers:
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">
As well as these scripts:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Bootstrap -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
Please refer to the images below (the last image shows the desired layout on mobile):
https://i.sstatic.net/sRbpI.png
https://i.sstatic.net/EkY7L.png
https://i.sstatic.net/VbZSy.png
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">
</head>
<body>
<div class="container">
<hr>
<h5>1st step: Type the valuations criteria:</h5>
<div class="input-group input-group-lg input-group-sm mb-3">
<span class="input-group-text" data-bs-toggle="tooltip" data-bs-placement="bottom" title="The search will include properties sold within the radius">Radius:</span>
<input type="number" class="form-control" id="radiusMetersId" value=300 min="100" max="10000" step="100" data-bs-toggle="tooltip" data-bs-placement="bottom" title="(meters)">
<span class="input-group-text">Sale type:</span>
<select class="form-control" id="saleTypeId">
<option value="apartment">Apartment</option>
<option value="house">House</option>
<option value="all">All</option>
</select>
<span class="input-group-text">Sqm:</span>
<input class="form-control" type="number" value="50" min="5" max="100000" step="5" id="sqmId">
<span class="input-group-text">Rooms:</span>
<input class="form-control" type="number" value="3" min="0" max="10" step="1" id="roomsId">
</div>
</div>
<script src = "https://code.jquery.com/jquery-3.6.0.min.js" ></script>
<script src = "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" ></script>
</body>