1. bootstrap grid
https://mdbootstrap.com/learn/mdb-foundations/bootstrap/grid-system/
for the grid to work properly, you should always place columns in rows, and rows in containers.
Bootstrap grid allows you to add up to 12 columns in one line. If you add more than 12, the excess column will jump to the next line.
Breakpoints are the triggers in Bootstrap for how your layout responsive changes across device or viewport sizes.
<div class="container">
<div class="row">
<div class="col-md-4">First column</div>
<div class="col-md-8">Second column</div>
</div>
</div>
All we have to do is add a breakpoint -md
(meaning "medium screen size") to the col
class, so that the Bootstrap grid knows that we want 4/8 columns ratio only on screens bigger than medium size, and on other screens (medium and small size) the columns should be stretched to full width.
To sum up - by using class col-md-4
, we tell grid the following command:
- On screens smaller than 768px, I want this column to stretch to full width
- On screens larger than 768px, I want this column to be 4 units wide
No comments:
Post a Comment