2014-02-09 79 views
0

我有我的網站下面的代碼,我想填充添加到組圖片鏈接在我的網頁如何上襯墊添加到組鏈接圖像的

<ul class=""> 
     <a href="https://www.github.com"> 
      <img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/github.png" border="0" alt="Code" class=""> 
     </a> 
     <a href="http://www.linkedin.com"> 
      <img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/linkedin.png" border="0" alt="Connect" class=""> 
     </a> 
     <a href="https://www.twitter.com"> 
      <img style="height:auto; width:auto; max-width:50px; max-height:50px;" src="images/twitter.png" border="0" alt="Twitter"> 
     </a> 
     </ul> 

我也有下面的CSS:

a{ 
    color:black; 
    text-decoration: none; 
    margin: 0px auto; 
    width: 400px; 
} 
ul{ 
    padding: 0; 
} 

什麼會我需要做對我的網站羣體圖像鏈接添加垂直填補?

回答

0

不知道這是你想要的,但嘗試使用padding-top

ul a img { 
    padding-top: 10px; /* Change the value according to your needs */ 
} 

順便說一句,你應該給類的元素更具體地定位它。