Bootstrap 5 Grid: XXL
- Previous Page BS5 Grid XLarge
- Next Page BS5 Grid Example
XXL device grid instance
XSmall | Small | Medium | Large | Extra Large | XXL | |
---|---|---|---|---|---|---|
class prefix | .col- |
.col-sm- |
.col-md- |
.col-lg- |
.col-xl- |
.col-xxl- |
screen width | <576px | >=576px | >=768px | >=992px | >=1200px | >=1400px |
XXL devices are defined as having 1400 pixels and abovescreen width.
The following example will produce a 50%/50% split on medium, large, and extra-large devices, and a 25%/75% split on XXL devices. On small and extra-small devices, it will automatically stack (100%):
Example
<div class="container-fluid"> <div class="row"> <div class="col-md-6 col-xxl-3"> <p>The World Wide Fund for Nature (WWF), founded on April 29, 1961, has a giant panda as its logo ...</p> </div> <div class="col-md-6 col-xxl-9"> <p>In 1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of giant pandas and their habitats ...</p> </div> </div> </div>
Note:Make sure the total is always 12.
using XXL only
In the following example, we only specify .col-xxl-6
class (without .col-md-*
and / or .col-sm-*
). This means that xxlarge devices will split 50%/50%. However, for extra-large, large, medium, small, and extra-small devices, it will be vertically stacked (100% width):
Example
<div class="container-fluid"> <div class="row"> <div class="col-xxl-6"> <p>The World Wide Fund for Nature (WWF), founded on April 29, 1961, has a giant panda as its logo ...</p> </div> <div class="col-xxl-6"> <p>In 1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of giant pandas and their habitats ...</p> </div> </div> </div>
Automatic Layout Columns
In Bootstrap 5, there is a simple way to create equal-width columns for all devices: just from .col-xxl-*
Remove the numbers and use only on the col element .col-xxl
Class. Bootstrap will recognize how many columns there are, and each column will receive the same width.
If the screen sizeLess than 1400px, columns will be horizontally stacked:
<!-- Two columns: at extra-large and above devices are 50% width --> <div class="row"> <div class="col-xxl">1 of 2</div> <div class="col-xxl">2 of 2</div> </div> <!-- Four columns: at extra-large and above devices are 25% width --> <div class="row"> <div class="col-xxl">1 of 4</div> <div class="col-xxl">2 of 4</div> <div class="col-xxl">3 of 4</div> <div class="col-xxl">4 of 4</div> </div>
- Previous Page BS5 Grid XLarge
- Next Page BS5 Grid Example