Skip to content

Instantly share code, notes, and snippets.

@jacksonhoose
Last active August 29, 2015 14:09
Show Gist options
  • Save jacksonhoose/48d3c7601c3bbe4fa96b to your computer and use it in GitHub Desktop.
Save jacksonhoose/48d3c7601c3bbe4fa96b to your computer and use it in GitHub Desktop.
A nice way to vertically center content
<div class="auto-v-center">
<h2>Vertically Centered Stuff</h2>
<p>Indeed</p>
</div>
// scss
.auto-v-center {
@include inline-block(middle);
height:100%;
&:before {
@include inline-block(middle);
content: '';
height:100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment