"Materialize Modal Bottom Fullwidth"
Bootstrap 4.0.0 Snippet by johan190693

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col"> <div class=" m-4 p-2 bg-faded"> <p class="p-3" style="background-color:#fff"> <button class="btn btn-primary" data-toggle="modal" data-target="#myModalBottom">Launch Demo</button> </p> Just add class <code>.modal-bottom</code> to <span class="text-success"><div class="modal-dialog <code>modal-bottom</code>">...</div></span> </div> </div> </div> </div> <div class="modal fade" id="myModalBottom" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" style="display: none;" aria-hidden="true"> <div class="modal-dialog modal-bottom"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Modal Title</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body p-4"> <ul class="list-unstyled"> <li class="media"> <img class="d-flex mr-3" style="background-color:#ccc;width:72px;height:72px" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> </li> <li class="media my-4"> <img class="d-flex mr-3" style="background-color:#ccc;width:72px;height:72px" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> </li> <li class="media"> <img class="d-flex mr-3" style="background-color:#ccc;width:72px;height:72px" alt="Generic placeholder image"> <div class="media-body"> <h5 class="mt-0 mb-1">List-based media object</h5> Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. </div> </li> </ul> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary">I Agree</button> </div> </div> </div> </div>
.modal.fade .modal-bottom { -webkit-transform: translate(0, 25%); -o-transform: translate(0, 25%); transform: translate(0, 25%); } .modal .modal-bottom { margin:0; margin-top:auto; padding: 0; position:absolute; bottom:0; top:auto; left:auto; right:0; height:calc(55% + 160px); /* default height:45% its just for demo*/ } .modal .modal-bottom>.modal-content{ height:100%; border-color: #fff; border-radius:0; margin:0; } .modal-bottom .modal-body{height: calc(100% - 140px);overflow-y:auto;} @media (min-width: 1px){ .modal-bottom {max-width: 100%;width:100%;} } /*Custume scroll bar*/ .modal-bottom ::-webkit-scrollbar {width:8px} .modal-bottom ::-webkit-scrollbar-button {width:8px;height:5px} .modal-bottom ::-webkit-scrollbar-thumb:hover {background: #ccc} .modal-bottom ::-webkit-scrollbar-thumb { background:#f1f1f1;border: thin solid white;border-radius: 10px} .modal-bottom ::-webkit-scrollbar-track {background: #fff;border:thin solid white}

Related: See More


Questions / Comments: