Containers are a fundamental building block of Grayshift that contain, pad, and align your content withing a given device or viewport.

How they work

Containers are the most basic layout element in Grayshift 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.

Grayshift comes with two different containers:

  • .container, which sets a max-width at each responsive breakpoint
  • .container-fluid, which is width: 100% at all breakpoints

Default container

Our default .container class is a responsive, fixed-width container, meaning its max-width changes at each breakpoint.

  • sm: 540px;
  • md: 720px;
  • lg: 960px;
  • xl: 1140px;
<div class="container"></div>

Fluid container

Use .container-fluid for a full width container, spanning the entire width of the viewport.

<div class="container-fluid"></div>