Skip to content

Container

Containers are fundamental layout components in Responsive Style, required when using default grid system. They contain, pad, and center content. While nesting is possible, most layouts don't require nested containers.

Three container types available:

  • .container: Sets max-width at each breakpoint
  • .{breakpoint}:container: width: 100% until specified breakpoint
  • .container-fluid: Full-width at all breakpoints

Comparison table showing max-width behavior:

xs(<576px)sm(≥576px)md(≥768px)lg(≥992px)xl(≥1200px)
.container100%540px720px960px1140px
.sm:container100%540px720px960px1140px
.md:container100%100%720px960px1140px
.lg:container100%100%100%960px1140px
.xl:container100%100%100%100%1140px
.container-fluid100%100%100%100%100%

Basic Usage

Basic Usage