css vertical align p in div code example
Example 1: vertical align into div
#parent {position: relative;}
#child {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 50%;
height: 30%;
margin: auto;
}
Example 2: vertical align div
HTML:
Some txt
bla bla bla
CSS:
div.ext-box { display: table; height: 100%; width:100%;}
div.int-box { display: table-cell; vertical-align: middle; }