0

Should the container-fluid wrap all the body or only specific sections?

Bootstrap CSS

30th Jul 2020, 6:29 AM
Emma
6 ответов
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!!
31st Jul 2020, 4:45 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Okay, so I could use different types of containers on different sections?
31st Jul 2020, 5:05 AM
Emma
+ 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.
31st Jul 2020, 3:18 PM
Emma
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
30th Jul 2020, 6:43 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
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
31st Jul 2020, 8:01 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
Thank you for your help!
5th Aug 2020, 6:07 AM
Emma