I'm trying to vertically align my texts while ensuring that the green background div covers the entire height of the red color div. Right now, the green div only covers 90% of the red div and I'm not sure why. Can someone please explain what's happening and help me out?
Here is my HTML code:
<div id='wrapper'>
<div class='head'></div>
<h2 class='title'>Warm-Up</h2>
</div>
And here is my CSS code:
.title{
display: inline;
padding-left: 15px;
vertical-align: middle;
margin: 0;
}
.head{
width: 30px;
height: 50px;
display: inline-block;
background-color: #A9D075;
}
#wrapper{
width:200px;
background-color: red;
}
You can also view it on this link.
Thank you.