container is a simple layout element that centers your content horizontally. It becomes “fixed” at certain breakpoints to ensure optimal readability.
Basic Usage
The.container class can be used in any context, but is most commonly used as a direct child of:
.navbar.hero.section.footer
How it works
By default, the container will have a differentmax-width depending on the viewport width:
- On desktop (>= 1024px): container has a maximum width of 960px
- On widescreen (>= 1216px): container has a maximum width of 1152px
- On fullhd (>= 1408px): container has a maximum width of 1344px
Modifiers
Fluid Container
If you want a full-width container, use the.is-fluid modifier:
.is-fluid container removes the max-width constraint and adds left and right padding instead.
Breakpoint Containers
You can have containers that are only “fixed” starting at certain breakpoints:Widescreen Container
.is-widescreen container will be:
- Full-width up to 1215px
- Fixed-width (max 1152px) from 1216px and above
FullHD Container
.is-fullhd container will be:
- Full-width up to 1407px
- Fixed-width (max 1344px) from 1408px and above
Max Width Modifiers
You can also set a maximum width for the container:Max Tablet
.is-max-tablet container has a max-width of approximately 736px.
Common Patterns
Container in Section
Container in Hero
Multiple Containers
Responsive Behavior
On mobile and tablet devices (up to 1023px), the container is full-width and will not have any horizontal margin.
| Viewport | Behavior |
|---|---|
| Mobile (up to 768px) | Full-width |
| Tablet (769px - 1023px) | Full-width |
| Desktop (1024px - 1215px) | Max 960px, centered |
| Widescreen (1216px - 1407px) | Max 1152px, centered |
| FullHD (1408px+) | Max 1344px, centered |
