1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

fixes #4118: responsive modal gets width auto and improved positioning for narrower widths

This commit is contained in:
Mark Otto 2012-07-24 00:44:11 -07:00
parent c37aa99e28
commit 87aa61001e
2 changed files with 22 additions and 10 deletions

View file

@ -835,6 +835,17 @@
display: inline-block; display: inline-block;
width: auto; width: auto;
} }
.modal {
position: fixed;
top: 20px;
right: 20px;
left: 20px;
width: auto;
margin: 0;
}
.modal.fade.in {
top: auto;
}
} }
@media (max-width: 480px) { @media (max-width: 480px) {
@ -866,15 +877,9 @@
padding-left: 10px; padding-left: 10px;
} }
.modal { .modal {
position: fixed;
top: 10px; top: 10px;
right: 10px; right: 10px;
left: 10px; left: 10px;
width: auto;
margin: 0;
}
.modal.fade.in {
top: auto;
} }
.modal-header .close { .modal-header .close {
padding: 10px; padding: 10px;

View file

@ -84,6 +84,17 @@
width: auto; width: auto;
} }
// Modals
.modal {
position: fixed;
top: 20px;
left: 20px;
right: 20px;
width: auto;
margin: 0;
&.fade.in { top: auto; }
}
} }
@ -133,13 +144,9 @@
// Modals // Modals
.modal { .modal {
position: fixed;
top: 10px; top: 10px;
left: 10px; left: 10px;
right: 10px; right: 10px;
width: auto;
margin: 0;
&.fade.in { top: auto; }
} }
.modal-header .close { .modal-header .close {
padding: 10px; padding: 10px;