2014-02-09 77 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 */ 
} 

顺便说一句,你应该给类的元素更具体地定位它。