Created
December 24, 2015 15:10
-
-
Save lucasdavila/019919db6cbd4297cd9b to your computer and use it in GitHub Desktop.
Fix middle alignment
This file contains hidden or 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
function fixMiddleAlignment() { | |
var header = $('.middle.aligned'), | |
halfOfHeight = header.height() / 2; | |
header.css('position', 'relative'); | |
header.css('top', 'calc(50% - ' + halfOfHeight + 'px)'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment