【问题标题】:How to put two inline input field correctly with Twitter Bootstrap?如何使用 Twitter Bootstrap 正确放置两个内联输入字段?
【发布时间】:2012-02-09 01:39:37
【问题描述】:

我在<div class="offset3 span6">bootstrap-responsive.css 执行以下操作:

<div class="control-group">
  <label class="control-label" for="passport1">Series and passport number</label>
  <div class="controls">
    <input type="text" class="input-small inline" id="passport1" placeholder="" maxlength="4">
    <input type="text" class="input-medium inline" id="passport2" placeholder="" maxlength="6">
    <p class="help-block">Please input your passport details into two fields above</div>                    
  </div>
</div>

但文本标签未与输入字段对齐(较低)。如何解决?

demo

【问题讨论】:

  • 你在某处有测试示例吗?
  • @BarryChapman,刚刚创建了它 - jsfiddle.net/and7ey/5S5CB
  • 你希望它如何排列?
  • 我认为文本的顶部应该与输入的顶部处于同一水平。

标签: css twitter-bootstrap


【解决方案1】:

您的标签上有一个 5px 的顶部填充;

考虑覆盖此内联或创建更具体的 css 选择器,然后重试。

【讨论】:

    猜你喜欢
    • 2016-12-12
    • 1970-01-01
    • 2014-05-19
    • 1970-01-01
    • 2023-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-13
    相关资源
    最近更新 更多