Vertical alignment

HTML:

<div class="parent">
    <div class="child">Text inside the block.</div>
    <div class="helper"></div>
</div>

CSS:

.child {
    display: inline-block;
    vertical-align:middle;
    text-align: center;
    max-width: 98%;
}

.helper {
    display: inline-block;
    vertical-align:middle;
    height: 100%;
    width:0px;
}

.parent {
    display: block; /* element must be like “block” */
    height: 300px;  /* specify height */
}

An object with the class .child should not have the float property.

Example on JSFiddle