JSFiddle - React, Tailwind, and code Playground
by SathyaHere
HTML
<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<!--
Bootstrap docs: https://getbootstrap.com/docs
-->
<div class="container">
<div class="row">
<div class="col">
<div class="form-group">
<label for="gender1" class="col-sm-2 control-label">With Bootstrap:</label>
<div id="bg">
<select class="form-control" id="gender1">
<option>Male</option>
<option>Female</option>
</select>
</div>
</div>
</div>
</div>
</div>
CSS
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col {
border: solid 1px #6c757d;
padding: 10px;
}
#bg {
display: inline-block;
background-color: lightblue;
width: 70%;
height: 200px;
padding-left: 20px;
padding-right: 20px;
}
#bg select {
position: relative;
top: 50px;
}