Basically it created a vertical spacing in columns which I am struggling to find a way to remove
<div
class="container-fluid">
<div class="row ">
<h1 class="heading">A Simple database</h1>
<h2 class="col-7" id="search-section">Search Bar and others</h2>
<h2 class="col-5" id="result-section">Result</h2>
</div>
<div class="row">
<div id="data-box" class="col-7">
<label for="">Search with Serial number :</label>
<input type="text" id="search-box" maxlength="5" placeholder="Enter Serial Number">
<input type="submit" value="Submit" id="sub">
</div>
<div id="result-box" class="col-5"></div>
</div>
</div>
i tried to use
margin-bottom= 20px
but it didn’t work
2
Answers
You can use the CSS property margin-bottom with a value of 0 to remove the vertical spacing between columns in Bootstrap
For Bootstrap 5x use
g-0
along with the classrow
(Docs)Example
class="row g-0"
For Bootstrap 4x use the class
no-gutters
along withrow
Example
class="row no-gutters"
These will remove the column spacing.
Note: All direct children of element with class
row
should have acol
orcol-*
class.