The Container are based on the Bootstrap 5 grid, see docs here
Containers are the most basic layout element and are required when using our default grid system. Containers are used to contain, pad, and (sometimes) center the content within them. While containers can be nested, most layouts do not require a nested container.
CSS comes with two different containers:
.container, which sets a max-width at each responsive breakpoint.container-fluid, which is width: 100% at all breakpointsThe table below illustrates how each container's max-width across each breakpoint.
|
Extra small <576px |
Small ≥576px |
Medium ≥768px |
Large ≥992px |
X-Large ≥1200px |
XX-Large ≥1400px |
|
|---|---|---|---|---|---|---|
| .container | 100% | 540px | 720px | 960px | 1140px | 1320px |
| .container-fluid | 100% | 100% | 100% | 100% | 100% | 100% |
Our default .container class is a responsive, fixed-width container, meaning its max-width changes at each breakpoint.
<div class="container">
<!-- Content here -->
</div>Use .container-fluid for a full width container, spanning the entire width of the viewport.
<div class="container-fluid">
...
</div>