I am unable to get equal padding form custom nested grid.
In the below snippet I show you the desired grid. I am unable to add small gap of lets say 5px
between all boxes. The issue is that if I change custom padding then I am not able to maintain the height of box 3 and 4 combined the same as the height of box 1/2. Can anyone suggest a good solution?
.box {
border-radius:20px;
border: 2px solid #000;
height: 100px;
vertical-align: middle;
text-align: center;
line-height: 100px;
}
.box2 {
border-radius:20px;
border: 2px solid #000;
height: 50px;
vertical-align: middle;
text-align: center;
line-height: 50px;
}
.custom-padding{
padding: 0px !important;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-xs-6 box custom-padding">1</div>
<div class="col-xs-3 box custom-padding">2</div>
<div class="col-xs-3">
<div class="row">
<div class="col-xs-12 box2 custom-padding">3</div>
<div class="col-xs-12 box2 custom-padding">4</div>
</div>
</div>
</div>