I would like to use bootstrap 4 margin and padding properties with pixels instead of rems. For example, I would like the following div to have margin-left of 20 pixels:
<div class="container ml-20">Hi</div>
Is it even possible? Thanks in advance.
Bootstrap doesn't have anything like this. However, you can create a custom css class to handle this for you:
.ml-20 {
margin-left: 20px;
}
Your options are limitless with how you want to set it up. You could create ml-10, ml-100 or anything you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With