Skip to content

Instantly share code, notes, and snippets.

@mildfuzz
Created August 13, 2014 13:39
Show Gist options
  • Select an option

  • Save mildfuzz/dbcfa183f839b6ea14d5 to your computer and use it in GitHub Desktop.

Select an option

Save mildfuzz/dbcfa183f839b6ea14d5 to your computer and use it in GitHub Desktop.
Mixin to center vertically and horizontally
@mixin total-center {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translateY(-50%) translateX(-50%);
-ms-transform: translateY(-50%) translateX(-50%);
transform: translateY(-50%) translateX(-50%);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment