0

I am able to horizontally center my image items inside my divs, but how do I achieve this vertically too?

Important to note the image height may vary.

http://jsfiddle.net/7b3mu9wt/5/

li {
  float: left;
  width: 195px;
  height: 195px;
  border: 1px solid black;
  list-style-type: none
}
li div {
  text-align: center
}
<ul>

  <li>
    <div>
      <img class="logo" src="http://placehold.it/50x50" />

    </div>
  </li>


  <li>
    <div>
      <img class="logo" src="http://placehold.it/50x100" />

    </div>
  </li>

</ul>
michaelmcgurk
  • 6,367
  • 23
  • 94
  • 190

0 Answers0