I create a table with CSS ,and I want to cell values to be in middle vertical align.I use this CSS code :
div.cell
{
float: right;
border-left: 1px #293F6F solid;
border-bottom: 1px #293F6F solid;
height: 55px;
width: 27%;
text-align: center;
display: table-cell;
vertical-align: middle;
}
and my html code :
<div class="cell">XYZ</div>
But It does not work.also other vertical-align types such as “text-bottom” and “bottom” and “top” dont work.Regards
If the
float: right;is important I suggest removing theheight: 55px;of the div and usepadding-top/bottomto position the text.