Use this formula, and it will works always without cracks:
#outer {height: 400px; overflow: hidden; position: relative;}_x000D_
#outer[id] {display: table; position: static;}_x000D_
_x000D_
#middle {position: absolute; top: 50%;} /* For explorer only*/_x000D_
#middle[id] {display: table-cell; vertical-align: middle; width: 100%;}_x000D_
_x000D_
#inner {position: relative; top: -50%} /* For explorer only */_x000D_
/* Optional: #inner[id] {position: static;} */
_x000D_
<div id="outer">_x000D_
<div id="middle">_x000D_
<div id="inner">_x000D_
any text_x000D_
any height_x000D_
any content, for example generated from DB_x000D_
everything is vertically centered_x000D_
</div>_x000D_
</div>_x000D_
</div>
_x000D_