I'm trying to create a div
with absolute
position inside of another div
with relative
position using Bootstrap 4 like this:
.p-r{
padding:8px;
background-color:#ddd;
height:100px;
}
.p-a{
bottom:3px;
background-color:#000
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="p-r position-relative">
<div class="p-a position-absolute w-100">
text
</div>
</div>
</div>
<div class="col-md-6">
<div class="p-r position-relative">
<div class="p-a position-absolute w-100">
text
</div>
</div>
</div>
</div>
</div>
However, I have noticed that the padding
does not work properly in the absolute
positioned div
: