ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 5 Column Break
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 Break</title> <style type="text/css"> .layout--design{ height:100px; background-color:#F8F9FA; margin:20px; padding:15px; text-align:center; } </style> </head> <body> <h1 class="text-center">Bootstrap 5 Column Breaking</h1> <p class="text-justify text-center"> In this example, you will learn and understand how to break columns to a new line using the .w-100 utility class. It forces the column to start in a new line. </p> <div class="container"> <div class="row"> <div class="col-6 col-sm-3 layout--design">.col-6 .col-sm-3</div> <div class="col-6 col-sm-3 layout--design">.col-6 .col-sm-3</div> <!-- Force next columns to break to new line --> <div class="w-100"></div> <div class="col-6 col-sm-3 layout--design">.col-6 .col-sm-3</div> <div class="col-6 col-sm-3 layout--design">.col-6 .col-sm-3</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