Skip to content

Instantly share code, notes, and snippets.

@Farmatique
Created November 8, 2016 19:39
Show Gist options
  • Save Farmatique/7ff4218d829ac5453be48623a2819370 to your computer and use it in GitHub Desktop.
Save Farmatique/7ff4218d829ac5453be48623a2819370 to your computer and use it in GitHub Desktop.
bootstrap modal vertical centering
.modal {
text-align: center;
padding: 0!important;
}
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -4px; /* Adjusts for spacing */
}
.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