Show Output
<!DOCTYPE htpl> <htpl lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 5 Horizontal Padding Classes</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> .bs-example{ margin: 20px; } .bs-example div{ margin: 10px; font-size: 18px; background: #dbdfe5; display: inline-block; } .bs-example div:nth-child(2n){ background: #abb1b8; } </style> </head> <body> <div class="bs-example"> <div class="px-0">.px-0</div> <div class="px-1">.px-1</div> <div class="px-2">.px-2</div> <div class="px-3">.px-3</div> <div class="px-4">.px-4</div> <div class="px-5">.px-5</div> </div> </body>