0

I'm coding it

<div>
 <a href="http://example1.com">
   <img src="example1.gif" />
 </a>
</div>
<div>
 <a href="http://example2.com">
   <img src="example2.gif" />
 </a>
</div>

a {
  text-align:center;
  height :80px;
  display:block;
}

The centering of the horizontal direction do well. but vertical is not. How to do it? By the way, the height of example2.gif is different from example1.gif

freddiefujiwara
  • 57,041
  • 28
  • 76
  • 106

1 Answers1

1

You will want to set vertical-align: middle; on your img elements.

André Eriksson
  • 4,296
  • 2
  • 19
  • 16