Created
February 13, 2017 19:30
-
-
Save marcoskubis/7951fd7c36f95166a1b2e445b64098ea to your computer and use it in GitHub Desktop.
Bootstrap modal centralized vertically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Created by: Finik | |
* Copied from http://stackoverflow.com/questions/18422223/bootstrap-3-modal-vertical-position-center | |
*/ | |
.modal { | |
text-align: center; | |
} | |
@media screen and (min-width: 768px) { | |
.modal:before { | |
display: inline-block; | |
vertical-align: middle; | |
content: " "; | |
height: 100%; | |
} | |
} | |
.modal-dialog { | |
display: inline-block; | |
text-align: left; | |
vertical-align: middle; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment