mattrc
4/7/2012 - 10:09 AM

CSS Vertical Align (table approach)

CSS Vertical Align (table approach)

/**
 * CSS Vertical Align (table approach)
 */

div {
  display: table;
  
  width: 300px;
  height: 300px;
  border: 2px solid #333;
  padding: 1em;
}
 
div p {
  display: table-cell;
  vertical-align: middle;
}
<div>
   <p>Competently maintain B2B products after holistic methodologies. Uniquely mesh interdependent scenarios.</p>
</div>
{"view":"separate","seethrough":"","prefixfree":"1","page":"all"}