Hey Everyone have a couple questions regarding centering text and divs within a container.
Here is my codepen. http://codepen.io/_Dawood/pen/ByjvqO
My questions:
1.) What's the best way to get any element (text, images) inside a div to be centered vertically. 2.) Is it a good or bad idea to used a fixed height on the container div?
<header>
<div class="logo">
logo
</div>
<h1 class="SiteTitle">
Registrar's <span>Office</span>
</h1>
<div class="search">
Search
</div>
<div class="az">
A -> Z Index
</div>
<div class="sublinks">
<a href=""> About</a>
<p>Main Office</p>
</div>
</header>
@import 'susy';
* { box-sizing: border-box; }
header {
background:red;
width:100%;
height: 100%;
@include container(100%);
height:100px;
.logo{
@include span(3 of 12);
border:1px solid #fff;
height: 100%;
}
h1{
@include span(5 of 12);
border:1px solid #fff;
height: 100%;
font-size:40px;
}
.search, {
@include span(2 of 12);
border:1px solid #fff;
height: 100%;
}
.az {
@include span(2 of 12 last);
border:1px solid #fff;
height: 100%;
}
.sublinks {
background:blue;
clear:both;
text-align:right;
@include span(12 of 12 );
@include break;
a, p {
display:inline-block
}
}
}