Skip to content

[Question] Spacing per col for v5 #33774

Answered by Hiws
lenamtl asked this question in Q&A
Apr 27, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

The spacing utilities support breakpoints for when the utility should be used.
https://getbootstrap.com/docs/5.0/utilities/spacing/#notation

In your case you'd add mt-md-3 to add a top margin when on the md breakpoint.
The issue is that this will also be valid on the lg breakpoint, which is why you'll also need to add mt-lg-0 to set the margin back to 0.

I haven't used Bootstrap 5 yet, but perhaps there's a smarter way to add spacing between columns when they collapse in v5, but the above should be the answer to your question.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@lenamtl
Comment options

@hwang1588
Comment options

Answer selected by lenamtl
Comment options

You must be logged in to vote
1 reply
@Hiws
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants