![]() |
VOOZH | about |
Bootstrap 5 Grid system Setting one column width is used to set the width of a specific column, it can be applied to any column. The Auto-layout for flexbox grid columns means you can set the width of one column and the sibling columns will automatically resize around it.
Bootstrap 5 Grid system Setting one column width Class: There is no specific class for this, you .an use the col-& classes to set the width.
Syntax:
<div class="row"> <div class="col"> ... </div> <div class="col-6"> ... </div> <div class="col"> ... </div> </div>
Example 1: The code in the example shows how setting only the center column's width leads the other columns to resize themselves accordingly.
Output:
Example 2: The code in the example shows how setting only the center column's width inside even Nested Grid also leads the other columns to resize themselves accordingly:
Output:
Reference:https://getbootstrap.com/docs/5.0/layout/grid/#setting-one-column-width