I have written some simple code using HTML and Bootstrap. Out of nowhere there is margin bottom to div in form of 8, 16 etc.
I tried mentioning div margin in separate stylesheet as 0. Does anyone know why this is happening?
body {
margin: 0;
}
div {
margin-bottom: 0;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div id="sup" class="bg-danger p-4 h1">
Title
</div>
<div class="bg-dark">
<ul class="d-flex flex-row justify-content-end list-unstyled">
<li class="m-3 p-3 bg-light">
Home
</li>
<li class="m-3 p-3 bg-light">
About
</li>
<li class="m-3 p-3 bg-light">
Products
</li>
</ul>
</div>
<div class="bg-warning p-5 h1 d-flex justify-content-between">
<div class="m-4">
it will content image
</div>
<div class="card m-4" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Contact us</h5>
<p class="card-text h6"></p>
<p class="card-text h6">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Contact Now</a>
</div>
</div>
</div>