carlos-sanchez
11/27/2013 - 3:07 AM

Justified and Vertically Centered Header Elements http://tympanus.net/codrops/2013/07/14/justified-and-vertically-centered-header-elements

/* For justifying */

header {
    text-align: justify;
    letter-spacing: 1px;
    height: 8em;
    padding: 2em 10%;
    background: #2c3e50;
    color: #fff;
}

header h1,
header nav {
    display: inline-block;
}

header::after {
    content: '';
    display: inline-block;
    width: 100%;
}

/* For centering vertically */

header h1 {
    height: 100%;
}
 
header h1::before {
    content: '';
    display: inline-block;
    vertical-align: middle; 
    height: 100%;
}