无法删除网页切片图像中图像下方的空间

时间:2017-01-27 20:22:12

标签: html css image html-table spacing

该页面的链接是westvillenyc.com/super-draft。图像排下面那个小小的黑色空间令人沮丧!我试过编辑样式表和我的HTML代码无济于事。这是我到目前为止的html编码:

HTML编码:

<table class="address_table2" style="height: 341px;" width="700">
<tbody>
<tr>

<td align="center" width="681" height="0"><a href="http://westvillenyc.com/wp-content/uploads/2017/01/SuperBowlHalfPage.jpg" rel="attachment wp-att-21167"><img class="wp-image-21167 aligncenter" src="http://westvillenyc.com/wp-content/uploads/2017/01/1-1024x393.jpg" alt="1" width="681" height="261" /> </a></td>
</tr>

<tr>
<td align="center"><a href="http://westvillenyc.com/wp-content/uploads/2017/01/3.jpg" rel="attachment wp-att-21168"><img class="alignnone wp-image-21168" src="http://westvillenyc.com/wp-content/uploads/2017/01/3.jpg" alt="3" width="212" height="48" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/4.jpg" rel="attachment wp-att-21169"><img class="alignnone wp-image-21169" src="http://westvillenyc.com/wp-content/uploads/2017/01/4.jpg" alt="4" width="148" height="48" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/5.jpg" rel="attachment wp-att-21170"><img class="alignnone wp-image-21170" src="http://westvillenyc.com/wp-content/uploads/2017/01/5.jpg" alt="5" width="144" height="48" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/6.jpg" rel="attachment wp-att-21171"><img class="alignnone wp-image-21171k;" src="http://westvillenyc.com/wp-content/uploads/2017/01/6.jpg" alt="6" width="179" height="48" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/7.jpg" rel="attachment wp-att-21173"><img class="alignnone wp-image-21173" src="http://westvillenyc.com/wp-content/uploads/2017/01/7.jpg" alt="7" width="286" height="76" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/7-2.jpg" rel="attachment wp-att-21172"><img class="alignnone wp-image-21172" src="http://westvillenyc.com/wp-content/uploads/2017/01/7-2.jpg" alt="7 (2)" width="125" height="76" /></a><a href="http://westvillenyc.com/wp-content/uploads/2017/01/9.jpg" rel="attachment wp-att-21174"><img class="alignnone wp-image-21174" src="http://westvillenyc.com/wp-content/uploads/2017/01/9.jpg" alt="9" width="276" height="76" /></a></td>
</tr>
</tbody>
</table>

Css编码:

.address_table2 {

    display: block; 
    width: 100%;
    margin-top: 0px;
    margin-left: 0px;
    margin-bottom: 0px;
    margin-right: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    position: relative;
    border-spacing: 0;
    border-collapse: collapse;
}

任何想法?

1 个答案:

答案 0 :(得分:0)

  1. 重置顶部图片margin,将下面的图片向下推。
  2. CSS:

    img.wp-image-21167.aligncenter {
      margin: 0;
    }
    
    1. 推送最后一行图像。
    2. CSS:

      img.alignnone.wp-image-21172,
      img.alignnone.wp-image-21173,
      img.alignnone.wp-image-21174 {
        margin-top: -8px;
      }
      

      enter image description here