Last active
February 14, 2016 02:33
-
-
Save mrfoxtalbot/cb69042c8326e6713fab to your computer and use it in GitHub Desktop.
Alinear en vertical. Heterodoxo pero funciona. Como mixin mola mil.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.element { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} | |
/* As a mixin */ | |
@mixin centerer { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment