css table cell vertical align

47

.cell {
    vertical-align: middle;
    display: table-cell;
}
html:
<div id="parent">
  <div id="child">Content here</div>
</div>
	
css:
#parent {display: table}

#child {
  display: table-cell;
  vertical-align: top;
 }
 
IE Fix:
child {display: inline-block}

Comments

Submit
0 Comments