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 Compact Columns</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; 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 no-gutters"> <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>