【问题标题】:White space margin (not images)空白边距(不是图像)
【发布时间】:2014-01-10 17:50:03
【问题描述】:

我想知道为什么在选择时,L、D、W 的左侧有一个空格(您可以在某些列上看到)。请注意,它们不是图像,而是带有背景样式的,因此 display:inline 不会发挥作用,是吗?

谢谢。

图片在这里:http://i.imm.io/1mRPp.jpeg

<tr class="pos1">
    <td>1</td>
    <td class="posindicator"><img alt="" src="http://www.premierleague.com/etc/designs/premierleague/images/shim.gif" /></td>
    <td>(3)</td>
    <td class="club"><a href="http://www.premierleague.com/en-gb/clubs/profile.overview.html/newcastle">Newcastle Utd (S)</a></td>
    <td>2</td>
    <td><span class="form-win">W</span> <span class="form-win">W</span> <span class="form-nil">-</span></td>
    <td>6</td>
    <td><span class="form-lose">L</span> <span class="form-win">W</span> <span class="form-win">W</span></td>
    <td>6</td>
    <td><span class="form-win">W</span> <span class="form-win">W</span> <span class="form-win">W</span></td>
    <td>9</td>
</tr>

它们是相同的,只是背景颜色不同。

.form-draw {
   background: #999;
   color: #fff;
   font-weight: bold;
   padding: 0;
   display: inline-block;
   width: 1.5em;
   height: 1.5em;
   line-height: 1.5em;
   text-align: center;
   vertical-align: middle;
}

【问题讨论】:

  • 几乎没有人会在没有代码的情况下回答这个问题。
  • 我已经按照上面的方法添加了代码!
  • 这是一个严重的错误。由于它只影响几个盒子,我不会认为display:inline; 与它有任何关系。我确实认为 Jonathan Newmuis 也指 CSS,因为它可能是 CSS 的问题。
  • @Psyberion 是的,CSS 也包含在上面。不知道为什么。
  • @D.WONG 我们需要 CSS,因为正如您将它恰当地放在标签中一样,这(可能)是 CSS 的问题。要找到 CSS 错误,我们需要能够分析上述代码。无论如何,你添加了它真是太好了!

标签: css margin


【解决方案1】:

这是您在 span 元素之间留下的空白字符 (U+0020),将其删除后,跨度框将彼此相邻。

【讨论】:

    猜你喜欢
    • 2016-01-24
    • 1970-01-01
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-02
    • 1970-01-01
    相关资源
    最近更新 更多