1#parent {position: relative;}
2
3#child {
4 position: absolute;
5 top: 0;
6 bottom: 0;
7 left: 0;
8 right: 0;
9 width: 50%;
10 height: 30%;
11 margin: auto;
12}
1HTML:
2<div class="ext-box">
3 <div class="int-box">
4 <h2>Some txt</h2>
5 <p>bla bla bla</p>
6 </div>
7</div>
8
9CSS:
10div.ext-box { display: table; height: 100%; width:100%;}
11div.int-box { display: table-cell; vertical-align: middle; }