Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 4 Two Column Grid Layouts for Tablets and Desktops</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script> <style> /* Some custom styles to beautify this example */ .demo-content{ padding: 15px; font-size: 18px; background: #dbdfe5; margin-bottom: 15px; } .demo-content.bg-alt{ background: #abb1b8; } </style> </head> <body> <h2 class="text-center my-3">Bootstrap Responsive Layout</h2> <div class="text-center">Open the output in a new blank tab (Click the arrow next to "Show Output" button) and resize the browser window to understand how the Bootstrap responsive grid system works.</div> <div class="container mt-3"> <!--Row with two equal columns--> <div class="row"> <div class="col-md-6"> <div class="demo-content">.col-md-6</div> </div> <div class="col-md-6"> <div class="demo-content bg-alt">.col-md-6</div> </div> </div> <!--Row with two columns divided in 1:2 ratio--> <div class="row"> <div class="col-md-4"> <div class="demo-content">.col-md-4</div> </div> <div class="col-md-8"> <div class="demo-content bg-alt">.col-md-8</div> </div> </div> <!--Row with two columns divided in 1:3 ratio--> <div class="row"> <div class="col-md-3"> <div class="demo-content">.col-md-3</div> </div> <div class="col-md-9"> <div class="demo-content bg-alt">.col-md-9</div> </div> </div> </div> </body> </html>