I have an element that is 60 pixels high, which has other elements, such as an image, and several spans inside it, and I am having problems aligning them vertically inside an element with a height of 60 pixels. Here's the layout and CSS:
<div class="member"> <img src="images/pic.png" alt="John Smiths Profile Picture" class="pic"> <span class="name"><a href="">John Smith</a></span> <span class="skills">PHP, MySQL, Javascript, C#, Java</span> </div> #sidebar .member { height: 60px; margin-bottom: 10px; vertical-align: center; } #sidebar .member .name { font-size: 15px; font-weight: bold; } #sidebar .member .pic { width: 50px; height: 50px; border-radius: 50%; float: left; margin-right: 10px; } #sidebar .member .skills { display: block; font-size: 12px; overflow: hidden; }
I put it on jsfiddle: http://jsfiddle.net/CYFyx/2/
As you can see, the elements in the .member element push up. I need them to be vertically aligned like this:

Already tried vertical-align: middle; but no luck.
source share