Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Containers with Responsive Breakpoints</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> </head> <body> <div class="container-sm border py-3 my-3">100% wide until screen size less than 576px</div> <div class="container-md border py-3 my-3">100% wide until screen size less than 768px</div> <div class="container-lg border py-3 my-3">100% wide until screen size less than 992px</div> <div class="container-xl border py-3 my-3">100% wide until screen size less than 1200px</div> <p class="m-3"><strong>Note:</strong> The classes ".border", ".py-3", and ".my-3" are <a href="/twitter-bootstrap-tutorial/bootstrap-helper-classes.php" target="_top">utility classes</a> to add borders, paddings, and margins to the element, respectively.</p> <p class="m-3"><strong>Tip:</strong> 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.</p> </body> </html>