html - 如何去除图像和表格之间的这些空白区域?

标签 html css

这是我正在使用的实时沙箱页面:https://www.wingsfund.com/test1.html我正在尝试堆叠图像和表格以使其看起来像这样:https://www.wingsfund.com/但为什么那些空白会垂直展开呢?我如何让所有元素堆叠并粘在一起?

<table width="1000" height="55" border="0" align="center" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td width="200" ><img src="http://wingsfund.com/imgs/HOME-BLUE.jpg" width="200" height="55" alt=""/></td>
      <td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/what-we-seek.jpg" width="200" height="55"  onmouseover="this.src='http://wingsfund.com/imgs/what-we-seek-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/what-we-seek.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
      <td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/our-approach.jpg" width="200" height="55"  onmouseover="this.src='http://wingsfund.com/imgs/our-approach-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/our-approach.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
      <td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/public-market.jpg" width="200" height="55"  onmouseover="this.src='http://wingsfund.com/imgs/public-market-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/public-market.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
      <td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/about-us.jpg" width="200" height="55"  onmouseover="this.src='http://wingsfund.com/imgs/about-us-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/about-us.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
    </tr>
  </tbody>
</table>
    <center><img src="http://wingsfund.com/imgs/blue-strip.jpg" display: "block" width="1000" height="20" line-height= "0"; alt=""/></center>
<center><img src="http://wingsfund.com/imgs/banner.jpg" width="1000" height="565" line-height= "0"; alt=""/></center>
<table background="http://wingsfund.com/imgs/gray-bar.jpg" width="1000" height="92" border="0" align="center" cellpadding="0" cellspacing="0">

最佳答案

他们使用了一个 tr,然后在那个 tr 上放了一个背景,所以整个 td 都被填满了,没有显示空白。

<tr>
    <td colspan="11" style="background-image:url(wp-..........>
    </td>
</tr>

你所做的完全不同。 我本来要告诉你检查你的填充和边距,但它们似乎都设置为 0px。但是标签给了你那些空白,但我不知道为什么

关于html - 如何去除图像和表格之间的这些空白区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56032680/

相关文章:

javascript - offsetWidth 返回不正确的值

javascript - 我如何在点击按钮时隐藏某种样式并显示不同的样式

android - @font-face 不适用于 Chrome for Android

html - 名称中带有 ) 的 CSS 背景?

css - CSS 中的@apply 是什么?

javascript - 如何在带有背景图像的 div 中定位带有背景图像的 div?

javascript - 更改 JavaScript 中的 div 属性以获取索引值

javascript - 如何动态追加到2列

jquery - 如何更改特定菜单项的文本颜色?背景改变但文字颜色不变?

javascript - 如何在实时搜索表上应用奇数和偶数?