0
Should the container-fluid wrap all the body or only specific sections?
Bootstrap CSS
6 Respuestas
0
.container-{breaking-points} were not part of bs4 until 4.4 l, the issue we had is that, for smaller screen sizes the max-width was responsive BUT still it had width of around 80-90% which collapses the inner elements inside the container
so we used to correct it using media queries
AND, as of now from 4.4 we got breakpoints with container as well, so we don't have to use media queries.. and it would take width as per the breakpoints...
hope it helps!!
+ 1
Okay, so I could use different types of containers on different sections?
+ 1
Cool, thank you! And, last question if you still got some time. The container class has specific breaking points for the different screen sizes, why is that a better choice for content that are not full screen width? Because, at first, i thought the only difference between container and container-fluid wasn't so much about the content but more about how you want your webpage to be responsive to different screen sizes.
0
container-fluid is a 100% width responsive block, so when you want your content to cover full width you use container-fluid
And when you want your content to be in center with some space at both the ends then we just use container block.. which has roughly 80-90% width
0
yes you can
for example:
uf you have a full width carousel after the header or a footer of full width.. you can wrap them inside container fluid..
and if you have content like about us and you don't want them to take full width, wrap them within container class
0
Thank you for your help!