You made an error in nesting your .row
classes together. Ensure that you correct this nesting issue to resolve the problem.
As per Bootstrap's official API documentation, when nesting columns, any columns with the class .col
should be nested within a .row
. They should not be combined within a single element.
.row {
background: #f8f9fa;
margin-top: 20px;
}
.col {
border: solid 1px #6c757d;
padding: 10px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="modal-body">
<div class="modal-body-scrolled border-primary border-bottom p-0 mt-2">
<div class="row">
<label for="duration" class="col-2 pl-0">Description</label>
<div class="col-10 pl-0 d-inline">
<textarea class="form-control" rows="2" style="min-width: 100%"></textarea>
</div>
</div>
<div class="row">
<div class="col-2 spacer"></div>
<div class="col-10 pl-0 d-inline">
<button type="button" class="btn btn-sm btn-primary ml-auto"> Add </button>
</div>
</div>
</div>
</div>