Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Using Grid Inside Bootstrap Modal</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; } </style> </head> <body> <div class="bs-example"> <!-- Button HTML (to Trigger Modal) --> <a href="#myModal" role="button" class="btn btn-lg btn-primary" data-bs-toggle="modal">Launch Demo Modal</a> <!-- Modal HTML --> <div id="myModal" class="modal fade" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Send Us a Message</h5> <button type="button" class="btn-close" data-bs-dismiss="modal"></button> </div> <div class="modal-body"> <div class="row"> <div class="col-6"> <div class="mb-3"> <label class="form-label">First Name</label> <input type="text" class="form-control"> </div> </div> <div class="col-6"> <div class="mb-3"> <label class="form-label">Last Name</label> <input type="text" class="form-control"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="mb-3"> <label class="form-label">Email</label> <input type="email" class="form-control"> </div> </div> </div> <div class="row"> <div class="col-12"> <div class="mb-3"> <label class="form-label">Comments</label> <textarea class="form-control"></textarea> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary">Send Email</button> </div> </div> </div> </div> </div> </body> </html>