Bootstrap Grid, do I need a container?
Update Bootstrap 4
Outermost rows should also be wrapping in container
or container-fluid
in Bootstrap 4 to prevent horizontal scolling caused by negative margins on the .row
.
Bootstrap 3
You should wrap row
in container
or you'll have a problem with the negative margins that BS 3 uses for the row
element. Basically the row
is designed to be within a container. Read more on the Bootstrap grid
Play with this example on Bootply: http://bootply.com/83751
According to the latest documentation:
https://getbootstrap.com/docs/5.1/layout/gutters/#no-gutters
it is reasonable to drop the outer container (or at least its css class assignment):
Need an edge-to-edge design? Drop the parent .container or .container-fluid.
This appears to have been in the documentation since the 4.0 release: https://getbootstrap.com/docs/4.0/layout/grid/