Vertically centered block
by Eddie Lin
HTML
<div id="container">
<div id="content-wrapper">
<div id="content">Vertically centered block</div>
</div>
</div>
CSS
#container {
display: table;
width: 100%;
height: 200px;
background: #FFCCFF;
}
#content-wrapper {
display: table-cell;
vertical-align: middle;
}
#content {
text-align: center;
height: 100px;
background: #CCFFCC;
}