How do you apply margin or padding in Bootstrap using utility classes?
- margin-xs, padding-xs
- m-2, p-3
- mx-auto, px-4
- m-lg-5, p-md-2
In Bootstrap, you can apply margin and padding using utility classes such as m-2 for margin, p-3 for padding, mx-auto for horizontal margin, px-4 for horizontal padding, etc. These classes follow a shorthand notation, where the first letter represents the property (m for margin, p for padding), and the number represents the size.
Loading...
Related Quiz
- In advanced Bootstrap Sass usage, ___ loops can generate CSS based on a set of parameters or variables.
- What event is triggered when a Bootstrap modal is fully shown?
- What are the best practices for ensuring accessibility in custom Bootstrap components?
- The Bootstrap class 'navbar-___' is used to change the color scheme of the navigation bar.
- Describe a scenario where Bootstrap JS is essential while Bootstrap CSS is insufficient.