【问题标题】:Spacing issue with DIV container [closed]DIV 容器的间距问题[关闭]
【发布时间】:2012-03-13 04:06:51
【问题描述】:

我在下面的屏幕截图中有一个 DIV 容器。我在左右两边都有 15px 的填充,但由于某种原因,内容被向下隔开......

除了左右填充之外,没有应用其他任何内容。设置行高、边框、高度等没有任何区别。

输入本身包括:

<div class="numericInput">
   <input class="numeric input" type="text">
   <div class="numericWrap"><span class="increase"></span><span class="decrease"></span>
   </div>
</div>

根据 IE 开发人员工具,没有其他样式会导致差距,只有父 DIV。

【问题讨论】:

  • 为什么不将您的 CSS 代码添加到问题中?

标签: css html input spacing


【解决方案1】:

根据您的屏幕截图,在您的输入标签中定义vertical-align:top。像这样:

input{
 vertical-align:top;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-06-29
    • 2013-02-14
    • 1970-01-01
    • 1970-01-01
    • 2011-01-18
    • 2011-02-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多