Skip to content

Instantly share code, notes, and snippets.

@tomraithel
Created October 8, 2012 12:05
Show Gist options
  • Save tomraithel/3852171 to your computer and use it in GitHub Desktop.
Save tomraithel/3852171 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;
}
Copy link

ghost commented Nov 20, 2013

Thanks ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment