【问题标题】:Input type not full width of td with bootstrap classes输入类型不是带有引导类的 td 的全宽
【发布时间】:2016-11-07 00:13:22
【问题描述】:

我试图弄清楚为什么第 3 列输入文本框的宽度没有跨越 .我已将宽度设置为 px/% 但它仍然不起作用。这是我拥有的代码的 sn-p 以及它是如何出现的。

我想要的结果是第三列中的输入文本完全跨越该 td

【问题讨论】:

  • 将代码发布在代码块中,而不是图像中。

标签: c# html css twitter-bootstrap


【解决方案1】:

我猜你在width 中遇到了这个问题,而不是在整个专栏中

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div>
  <table class="table table-bordered">
   <colgroup>
     <col width=150px>
     <col width=150px>
     <col width=450px>
     <col width=170px>
   </colgroup>
    <tr class="text-center">
      <td><label for="">1</label></td>
      <td><label for="">2</label></td>
      <td><label for="">3</label></td>
      <td><label for="">4</label></td>
    </tr>
    <tr>
      <td><input type="text" class="form-control"></td>
      <td><input type="text" class="form-control"></td>
      <td><input type="search" class="form-control"></td>
      <td><input type="text" class="form-control"></td>
    </tr>
  </table>
</div>

检查一下。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-17
    • 2017-08-21
    • 2017-07-28
    • 2014-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多