BBS5 Containers
Learn about Bootstrap 5 containers.
BS5 Containers
Containers are the most basic layout element in Bootstrap and are required when using the default grid system.
Containers are used to wrap content, pad it, and (sometimes) center it within the viewport.
Container Types
Bootstrap 5 offers two main container classes:
.container- The class provides a responsive fixed width container.container-fluid- The class provides a full width container, spanning the entire width of the viewport
There are also responsive containers like .container-sm, .container-md, etc., which allow you to specify a class that is 100% wide until the specified breakpoint is reached.
Examples
Fixed Container
html/cssFluid Container
html/cssContainer Border and Color
html/css