Spacing linke Margin only for or more breakpoints

Hallo together

I have a topic where I do not know how best to implement it. I hope you can give me some tips from your experience.

I have a row with 4 cols. In the breakpoints from MD I put the 4 cols next to each other. In the breakpoints up to MD I want the cols unteinander. So far so good. But now to my problem:

If the cols are under each other, they need a margin bottom, because otherwise the contents in the cols are too close to each other. I can’t solve it if I just give the cols mb-5, because I don’t want this margin from breakpoint MD on.

How do you handle this? is there a simple trick, or is this something I have to solve via custom CSS?

Thanks for your support.

Kind regards

The utility classes can be applied at different breakpoints (xs, sm, md, lg, xl, xxl) by just adding the size to the class.

So if you want mb-5 on extra-small to small, you just put in two utility classes, one right after the other (separated by a space.)

mb-5 mb-md-0

This will take away the mb-5 on screen widths from medium on up.

1 Like