I am trying to align a text vertically in a DIV
. I tried it with CSS
line-height
property, but no luck.
This is my HTML -
<div class="vertical">
<h4>Content one</h4>
</div>
<br><br><br><br>
<div class="vertical">
<h4>This is Content Tow</h4>
</div
My CSS -
.vertical {
background: #8C3A0A;
border-radius: 6px;
color: #FFFFFF;
float: left;
height: 48px;
line-height: 50px;
margin-right: 10px;
padding: 5px;
text-align: center;
width: 25%;
}
Any body can tell me how I set these text to vertically center?
Thank You.