This code doesnt work due to margin in bootstrap
<div >
<div >
<div ></div>
<div ></div>
</div>
</div>
the only thing you can use in css is height and border
.row1, .row2{
border: 1px solid black;
}
.row1{
height: 150px;
}
.row2{
height: 70px;
}
CodePudding user response:
I don't know what you're trying to achieve with the classes that you already put there, but here is what's happening.
When the screen is bigger than 1200px it will apply the classes that you added, which means the two divs will become columns like the case that you have.
But if the screen is less than 1200px the two css classes do not work, and you'll get this, which I think is what you're trying to achieve:
So you just have to remove the col-lg-1
and it will work as you intended.