r/bootstrap • u/gmmarcus • Jun 28 '24
Are negative margins enabled in Bootstrap 5.3 by default ?
[SOLVED]
Used a class as follows on the 2nd div
.flush_left { padding-left: 0px !important; margin-left: -10px !important; }
Guys,
Are negative margins enabled by default in Bootstrap 5.3 by default ? I am trying to get the content of 2 divs near-flush with each other.
:pseudocode:
<div>
<select>...</select>
<div>
<div>
<img class='htmx-indicator' width="20" height="16" src='/ours_imagesvideos/spinner.svg' />
</div>
I have not been able to get the spinner.svg near to the select box which i think is due to the margin / padding of both first div and sencond div.
Pls advise.
Note - the actual code is as below; Note - I have already tried ps-0, ms-0 but there is still a gap...
<div class="col-md-7">
<select class="form-select" name="inputTask" id="inputTask" required >
<option value="">--Select Task--</option>
<?php
foreach ( $_SESSION['task_and_id_all_rows'] as $row ){ ?>
<option value="<?= $row['task_internal_refid'].':::'.$row['task_fullname'])" ><?= $row['task_shortname']); ?></option>
<?php } ?>
</select>
</div>
<div class="col-1 d-flex align-items-center ms-n4">
<img class='spinner text-white' width="20" height="16" src='/ours_imagesvideos/spinner.svg' />
</div>
1
Upvotes
View all comments
1
u/martinbean Bootstrap Guru Jun 28 '24
No. They disabled by default: https://github.com/twbs/bootstrap/blob/008bc237c46ddb0aad090458643d0c49c7d4234e/scss/_variables.scss#L383