How will you remove margin from a button/div using bootstrap class ?
Question: How will you remove margin from a button/div using bootstrap class ?
In Bootstrap, you can remove the margin from a button or a div by using the class .m-0.
The .m-0 class sets the margin property to zero on all four sides of the element. This means that there will be no space between the element and the surrounding elements.
This class can be applied to any element, like a button or a div, and will remove the margin from all sides of the element. If you want to remove only the margin from specific sides you can use classes like .ml-0 for margin left or .mt-0 for margin top.
For example, if you have a button with the class btn and you want to remove the margin around it, you can add the class .m-0 to the button element:
<button class="btn m-0">Click me</button>
Alternatively, you can use .my-0 to remove margin from top and bottom and .mx-0 to remove margin from left and right
By using this class, developers can easily remove the margin from an element without having to write custom CSS. This can save time and make it easier to maintain a consistent design throughout a website or application.
0 Komentar
Post a Comment