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 Large, Extra Large and Small Modals Sizes</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> .bs-example{ margin: 20px; } </style> </head> <body> <div class="bs-example"> <!-- Extra Large modal --> <button class="btn btn-primary" data-toggle="modal" data-target="#extraLargeModal">Extra Large modal</button> <div id="extraLargeModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog modal-xl"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Extra Large Modal</h5> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>Add the <code>.modal-xl</code> class on <code>.modal-dialog</code> to create this extra large modal.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary">OK</button> </div> </div> </div> </div> <!-- Large modal --> <button class="btn btn-primary" data-toggle="modal" data-target="#largeModal">Large modal</button> <div id="largeModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Large Modal</h5> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>Add the <code>.modal-lg</code> class on <code>.modal-dialog</code> to create this large modal.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary">OK</button> </div> </div> </div> </div> <!-- Small modal --> <button class="btn btn-primary" data-toggle="modal" data-target="#smallModal">Small modal</button> <div id="smallModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Small Modal</h5> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <p>Add the <code>.modal-sm</code> class on <code>.modal-dialog</code> to create this small modal.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary">OK</button> </div> </div> </div> </div> </div> </body> </html>