I have a div which contains two images to the left of some text.
I want both the images and the text to sit vertically centered within the div.
How do I do this? The text just seems to sit on the baseline.
I have tried specifying height in the parent div and then the same line-height for the text div (see below), but this doesn’t seem to work.
<div class=”qCat”>
<a href=”blah.html”><img src=”images/blah.gif” alt=”blah” width=”26″ height=”23″ border=”0″ /></a>
<img src=”images/blah.gif” alt=”blah” width=”21″ height=”21″ border=”0″ />
<a href=”blah.html” class=”qNavLink”>Basics</a>
<span class=”qDescriptor”>blah blah blah</span>
</div>
.qCat {
border-bottom:1px solid white;
height:15px;
}
a.qNavLink {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
font-style:normal;
font-weight:bold;
color:#FFFFFF;
text-decoration:none;
line-height:15px;
vertical-align:middle;
}
a.qNavLink:hover {
text-decoration:underline;
}
.qDescriptor {
display:inline;
font-size:90%;
line-height:15px;
vertical-align:middle;
}