Skip to content

Instantly share code, notes, and snippets.

@nicolasrenon
Last active August 29, 2015 14:06
Show Gist options
  • Save nicolasrenon/ef4fee410f0d41686b9f to your computer and use it in GitHub Desktop.
Save nicolasrenon/ef4fee410f0d41686b9f to your computer and use it in GitHub Desktop.
Vertical align without table property
.u-verticalAlign {
&:before {
content: '';
display: inline-block;
height: 100%;
margin-right: -0.25em;
vertical-align: middle;
}
}
.u-verticalAlign-content {
display: inline-block;
vertical-align: middle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment