0

Bootstrap5 Sizing does not support sizing depending on the viewport.

I would like to have this:

  • on small devices the width should be 100%
  • on larger devices the width should be 75%
  • on extra large devices the width should be 50%

The corresponding feature request was closed: https://github.com/twbs/bootstrap/issues/26528

How to work around this missing feature?

guettli
  • 25,042
  • 81
  • 346
  • 663
  • Does this answer your question? [Any way to get breakpoint-specific width classes?](https://stackoverflow.com/questions/47760132/any-way-to-get-breakpoint-specific-width-classes) – Jon Schneider Jun 16 '23 at 14:18

1 Answers1

2

For me using min-width and max-width was a usable work-around:

<div style="min-width: 20em; max-width: 40em; border: 1px solid">...</div>
guettli
  • 25,042
  • 81
  • 346
  • 663