title: How can I vertically center an image with an anchor inside a div?
body: <p>I have a row of DIVs for my navigation and I'm trying to vertically center an image with an anchor inside them using only CSS. I tried vertical-align: middle; but that isn't working. I'm sure it has to do with the float:left since all the images are pushed to the left side but when I take it out the divs go crazy.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="linkgroup"&gt;
          &lt;img src="images/homeIcon.png"&gt;
          &lt;li class="navItem"&gt;&lt;a href="somelink.com" class="navLink"&gt;HOME&lt;/a&gt;&lt;/li&gt;
      &lt;/div&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre><code>.linkgroup{
      float: left;
      height:5px;
      }
  </code></pre>