- Bootstrap Exploration: Layout Grid

Bootstrap Exploration: Layout Grid

Layout Grid

Arguably, one of Bootstrap's strongest features is its layout engine that allows developers to construct rigorous, responsive layouts with ease.

While you are encouraged to consult Bootstrap's exhaustive guide, you can simply remember that Bootstrap simply works in a 12-column grid. This means that you can go ahead and split the horizontal space into twelve parts and proceed with constructing different column permutations: you can make as many columns as you would like, as long as the column sizes add up to 12.

Note that the above example constructs a two-column layout, where the left column takes up 25% of the horizontal space (and the other, 75%).

Be advised that these "col-*" elements must be nested under "row" elements, and that you must start with a "container" element to indicate the start of a web page. Also, keep in mind that you can activate variable column sizes under different screen sizes by using Bootstrap-provided class names.

Finally: if you are curious about "mt-2" class name in the screenshot, note that the latest version of Bootstrap offers a short hand method to set up different margins and paddings.