【问题标题】:Html cant remove top and bottom spacing between two cellsHtml不能删除两个单元格之间的顶部和底部间距
【发布时间】:2013-11-20 20:18:37
【问题描述】:

我想知道如何删除this linkExperience: 4-5 Years文本之间的空格

没有添加填充或边距。但我仍然在顶部和底部获得空间。有人知道怎么解决吗?

【问题讨论】:

    标签: html html-table spacing


    【解决方案1】:

    最后一个<td>s 中有蓝色按钮a.sf-button。他们是30px 高并且有margin: 0 20px 20px 0 这使他们总共50px 高。由于这是<table>,因此按钮会将所有<td>s 扩展到50px 高度。

    【讨论】:

      【解决方案2】:

      对于蓝色图像背景 a.sf-button ,您设置了 margin:0px 20px 20px 0pxpadding: 6px 12px; 这导致了麻烦...我的建议是使用 display:table 类型进行此类布局! :)

      【讨论】: