How to make margin more that mt-5 or mb-5 in bootstrap4?


April 2019


19 time


I have a form that I need it's margin-top to be 100px. Can I have this margin with bootstrap classes or I need to define a custom class for it?

<form class="mt-5">

Maximum margin-top that I can achieve here is 48px

1 answers


Nop, but you can simply :

make another class - if you plan on reusing that class :

.mt-100 { margin-top: 100px; }

or give that form a identifier class - if it's just for that form, and it doesn't already have a specific identifier class:

.myForm { margin-top: 100px; }

No need to complicate things here. Simple and readable, and move on with your code :) Good luck!