What are Bootstrap containers?
Asked on Jun 01, 2025
1 Answer
Bootstrap containers are fundamental building blocks used to create responsive layouts. They provide a means to center your content and apply horizontal padding for alignment. Here's a basic example of how to use a Bootstrap container.
Hello, world!
This is a simple example of a Bootstrap container.
Additional Comment:
- Containers are used to contain, pad, and align your content within the grid system.
- There are three types of containers in Bootstrap:
.container
: A responsive fixed-width container..container-fluid
: A full-width container that spans the entire width of the viewport..container-{breakpoint}
: Responsive containers that change width at different breakpoints (e.g.,.container-sm
,.container-md
).
- Containers are essential for creating responsive designs that adapt to different screen sizes.