[Feature request] Auto-switch to .container-fluid on small screens
See original GitHub issueIt would be user-friendly for fixed-width sites (using .container
) to be able to switch to .container-fluid
when the screen size is sufficiently small. When the size of the screen is similar or smaller than the fixed-width, there’s no need to make the content smaller than the screen’s width anymore. Could something like one of the following be supported?
<div class="container-fluid container-md"></div>
<div class="container-auto-md"></div>
<div class="container-md"></div>
Using one of the above would have .container
behavior on medium and larger screens and .container-fluid
behavior on small and extra-small.
As an example I could find online for demonstration purposes, the Stack Overflow “navbar” switches to fluid when the screen width is smaller than the fixed width. To see this, make your browser window larger than the fixed width, then reduce the width of your browser until it is smaller than the fixed width. https://stackoverflow.com
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:8 (3 by maintainers)
this will be coming in 4.2 with my responsive containers PR.
https://github.com/twbs/bootstrap/pull/25631
apparently not in 4.2 or 4.3.
If you’re still looking for this functionality, go show so love over on the PR so we can finally get this thing merged.