Reputation: 445
I just read on this article that you can change bootstrap modal width with this:
.modal .modal-dialog { width: 800px; }
But when I do this, I loose the default responsiveness of the modal.
How can I change the width but keep the responsiveness on mobile?
Upvotes: 2
Views: 2871
Reputation: 2223
Just use max-width
. It will become responsive-
.modal .modal-dialog { width: 800px; max-width:100%; }
Or, You can do it via media queries.
@media only screen and (max-width: 480px) {
.modal .modal-dialog {
position:relative;
width:auto;
margin: 10px;
}
}
Upvotes: 6