Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Compact Columns</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> <style> /* Some custom styles to beautify this example */ .demo-content{ padding: 15px; font-size: 18px; min-height: 50px; background: #dbdfe5; margin-bottom: 15px; } .demo-content.bg-alt{ background: #abb1b8; } </style> </head> <body> <h2 class="text-center">Columns with Gutters</h2> <div class="container mt-3"> <div class="row"> <div class="col-4"> <div class="demo-content">.col-4</div> </div> <div class="col-4"> <div class="demo-content bg-alt">.col-4</div> </div> <div class="col-4"> <div class="demo-content">.col-4</div> </div> </div> </div> <hr> <h2 class="text-center">Columns without Gutters</h2> <div class="container mt-3"> <div class="row g-0"> <div class="col-4"> <div class="demo-content">.col-4</div> </div> <div class="col-4"> <div class="demo-content bg-alt">.col-4</div> </div> <div class="col-4"> <div class="demo-content">.col-4</div> </div> </div> </div> </body> </html>