/* CSS For vertically aligning content in the middle of a div */

/*
Sample usage:

<div style="height: 200px;">
    <div class="valign-center" style="width: 100px">
        <div>
            <div>
            ...centered...
            </div>
        </div>
    </div>
*/ 
.valign-center {
    float: left;
    display: table;
    #position: relative;
    overflow: hidden;
    height: 100%;
}

.valign-center div {
    display: table-cell;
    width: 100%;
    #position: absolute;
    #top: 50%;
    vertical-align: middle;
}

.valign-center div div {
    float: left; 
    #position: relative;
    #top: -50%;
}