Topic: Table within a fluid modal
David Morales Vega pro asked 7 years ago
Hi.
Try to enter a table within a modal, the problem is that the table is displayed on the page, under the modal link and not within the modal.
Thank you.
<div class="modal fade" id="modaldetalleventa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-notify modal-success modal-fluid modal-dialog-centered" role="document"> <!--Content--> <div class="modal-content"> <!--Header--> <div class="modal-header"> <p class="heading lead">Modal Success</p> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true" class="white-text">×</span> </button> </div> <!--Body--> <div class="modal-body"> <div class="text-center"> <i class="fa fa-check fa-4x mb-3 animated rotateIn"></i> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p> <table> <caption>table title and/or explanatory text</caption> <thead> <tr> <th>header</th> </tr> </thead> <tbody> <tr> <td>data</td> </tr> </tbody> </table> </div> <div> <p>d</p> </div> </div> <!--Footer--> <div class="modal-footer justify-content-center"> <a type="button" class="btn btn-success">Get it now <i class="fa fa-diamond ml-1"></i></a> <a type="button" class="btn btn-outline-success waves-effect" data-dismiss="modal">No, thanks</a> </div> </div> <!--/.Content--> </div> </div>
Marta Szymanska staff pro premium answered 7 years ago
Hi,
try this code:
<!-- Button trigger modal --> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modaldetalleventa"> Launch demo modal </button> <div class="modal fade" id="modaldetalleventa" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-notify modal-success modal-fluid modal-dialog-centered" role="document"> <!--Content--> <div class="modal-content"> <!--Header--> <div class="modal-header"> <p class="heading lead">Modal Success</p> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true" class="white-text">×</span> </button> </div> <!--Body--> <div class="modal-body"> <div class="text-center"> <i class="fa fa-check fa-4x mb-3 animated rotateIn"></i> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Impedit iusto nulla aperiam blanditiis ad consequatur in dolores culpa, dignissimos, eius non possimus fugiat. Esse ratione fuga, enim, ab officiis totam.</p> <table class="table"> <caption>List of users</caption> <thead> <tr> <th scope="col">#</th> <th scope="col">First</th> <th scope="col">Last</th> <th scope="col">Handle</th> </tr> </thead> <tbody> <tr> <th scope="row">1</th> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <th scope="row">2</th> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <th scope="row">3</th> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> </div> <!--Footer--> <div class="modal-footer justify-content-center"> <a type="button" class="btn btn-success">Get it now <i class="fa fa-diamond ml-1"></i></a> <a type="button" class="btn btn-outline-success waves-effect" data-dismiss="modal">No, thanks</a> </div> </div> <!--/.Content--> </div> </div>
Best,
Marta
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No