I am struggling with aligning the contents of multiple divs like this
<div class='unit'>number1</div>
<div class='unit'>number2</div>
<div class='unit'>number3</div>
css
.unit{
border: solid 2px yellow;
float: left;
height: 50px;
width: 50px;
text-align: center;
line-height: 50px;
vertical-align: middle;
}
I have tried using the CSS above to vertically align my contents within each unit, but I am only able to horizontally center the text. Can anyone provide assistance on how to achieve vertical alignment?