Skip to content

Instantly share code, notes, and snippets.

@simonsmith
Created April 13, 2012 13:45
Show Gist options
  • Save simonsmith/2376956 to your computer and use it in GitHub Desktop.
Save simonsmith/2376956 to your computer and use it in GitHub Desktop.
Centre elements on both axis - LESSified version of http://goo.gl/UN80L
.center-container {
text-align: center;
&:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -0.25em;
}
.center {
display: inline-block;
vertical-align: middle;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment