Skip to content

Instantly share code, notes, and snippets.

@simonwjackson
Forked from tomraithel/gist:3852171
Created October 22, 2012 21:09
Show Gist options
  • Save simonwjackson/3934342 to your computer and use it in GitHub Desktop.
Save simonwjackson/3934342 to your computer and use it in GitHub Desktop.
SASS: mixin for absolute center position
@mixin center($width, $height) {
position: absolute;
left: 50%;
top: 50%;
height: $height;
width: $width;
margin-left: - $width / 2;
margin-top: - $height / 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment