1, by adding a no semantic image to solve the vertical center of the image CSS, compatible with a variety of Ie6,ie7, Firefox, Google and other browsers. <style>. itm{border:2px solid #ccc; width:160px;height:160px;text-align:center;} . blank{width:0;height:160px;} . ITM Img{vertical-align:middle;} </style> <div class= "ITM" > <a Href= "" ></a> </div> 2, Use hack to center the picture vertically <style>. Box {/*/non IE mainstream browsers recognize the vertical centering method */Display:table-cell; Vertical-align:middle; /* Set Horizontal Center */text-align:center; /* for IE hack */*display:block; *font-size:175px;/* about a height of 0.873,200*0.873 about 175*/*font-family:arial;/* to prevent utf-8 failures caused by non-hack, such as GBK code */Widt h:200px; height:200px; border:1px solid #eee; }. Box img {/* Set picture vertically centered */vertical-align:middle; } </style> <div class= "box" > </div>