ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 5 Column Wrapping
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Bootstrap 5 Column Wrapping</title> <style type="text/css"> div{ height:100px; background-color:#F8F9FA; margin:20px; padding-top:20px; text-align:center; } </style> </head> <body> <h1 class="text-center">Bootstrap 5 Column Wrapping</h1> <p class="text-justify text-center"> Bootstrap 5 column wrapping states that if any row contains more than 12 columns, then the extra column is considered one unit and wrapped into a new line. </p> <div class="container"> <div class="row"> <div class="col-9">.col-9</div> <div class="col-4">.col-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> <div class="col-6">.col-6<br>First row second line last column</div> </div> </div> <!--/container--> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Output :
Running