Bootstrap Container Shortcode

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

Syntax

1{{% bs/container %}}
2BODY
3{{% /bs/container %}}

Parameters

breakpoint

PositionNameTypeRequiredDefaultSince
#0breakpointstring---

The breakpoint of container: sm, md, lg, xl, xxl, fluid.

class

PositionNameTypeRequiredDefaultSince
#1classstring---

Extra CSS classes.

bg

PositionNameTypeRequiredDefaultSince
-bgstring---

Background images, supports image resources, public images and external images.

bgColor

PositionNameTypeRequiredDefaultSince
-bgColorstring--v0.19.0

Background color.

Examples

 1{{% bs/container class="text-bg-primary text-center py-3 mb-2" %}}
 2Default container
 3{.mb-0}
 4{{% /bs/container %}}
 5
 6{{% bs/container breakpoint="sm" class="text-bg-primary text-center py-3 mb-2" %}}
 7100% wide until small breakpoint
 8{.mb-0}
 9{{% /bs/container %}}
10
11{{% bs/container breakpoint="md" class="text-bg-primary text-center py-3 mb-2" %}}
12100% wide until medium breakpoint
13{.mb-0}
14{{% /bs/container %}}
15
16{{% bs/container breakpoint="lg" class="text-bg-primary text-center py-3 mb-2" %}}
17100% wide until large breakpoint
18{.mb-0}
19{{% /bs/container %}}
20
21{{% bs/container breakpoint="xl" class="text-bg-primary text-center py-3 mb-2" %}}
22100% wide until extra large breakpoint
23{.mb-0}
24{{% /bs/container %}}
25
26{{% bs/container breakpoint="xxl" class="text-bg-primary text-center py-3 mb-2" %}}
27100% wide until extra extra large breakpoint
28{.mb-0}
29{{% /bs/container %}}
30
31{{% bs/container breakpoint="fluid" class="text-bg-primary text-center py-3 mb-2" %}}
32100% wide at all breakpoints
33{.mb-0}
34{{% /bs/container %}}

Default container

100% wide until small breakpoint

100% wide until medium breakpoint

100% wide until large breakpoint

100% wide until extra large breakpoint

100% wide until extra extra large breakpoint

100% wide at all breakpoints