I'm new to bootstrap, and in fact trying to retrofit a website that I didn't design myself. I'm trying to understand the purpose of the "container" class. Is there ever a case in which I would want no containers? How about two of them?
Like always the docs have the answer to such questions:
Containers
Easily center a page's contents by wrapping its contents in a .container. Containers set max-width at various media query breakpoints to match our grid system.
Taking a closer look at the css file, the container element has as set max-width pixel value:
@media (min-width: 992px) {
.container {
max-width: 970px;
}
While .col-
(span in v2) have their values set in percentages :
.col-md-1 {
width: 8.333333333333332%;
}
Container classes serve as a reference, allowing bootstrap's responsive grid layout to function properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With