twitter-bootstrap - Bootstrap : table goes behind the borders

标签 twitter-bootstrap

我正在尝试在模态中的井内制作表格。这是一段代码:

<div class="modal-body">
<form class="form-horizontal">
    <form class="well form-inline">
        <label><h5>rtu</h5></label>
        <table class="table table-bordered">
            <tr>
                <th>mid</th>
                <th>type</th>
                <th>inverce</th>
                <th>mbaddr</th>
                <th>din_reg_offset</th>
                <th>din_type</th>
                <th>dout_reg_offset</th>
                <th>dout_type</th>
                <th>ain_reg_offset</th>
                <th>ain_type</th>
                <th>aout_reg_offset</th>
                <th>aout_type</th>
                <th>float_type</th>
            </tr>
            <tr>
                <td><input type="text" id="mid"></td>
                <td><input type="text" id="type"></td>
                <td><input type="text" id="inverce"></td>
                <td><input type="text" id="mbaddr"></td>
                <td><input type="text" id="din_reg_offset"></td>
                <td><input type="text" id="din_type"></td>
                <td><input type="text" id="dout_reg_offset"></td>
                <td><input type="text" id="dout_type"></td>
                <td><input type="text" id="ain_reg_offset"></td>
                <td><input type="text" id="ain_type"></td>
                <td><input type="text" id="aout_reg_offset"></td>
                <td><input type="text" id="aout_type"></td>
                <td><input type="text" id="float_type"></td>
            </tr> 
        </table>
    </form>
</form>

但是 table 不适合井的边界。像这样:
enter image description here

但我想要这样的东西:
enter image description here
我做错了什么?
谢谢。

最佳答案

您的表格标记不正确。它应该遵循这种格式。

<table>
 <tr>
  <th>Month</th>
  <th>Savings</th>
 </tr>
 <tr>
  <td>January</td>
  <td>$100</td>
 </tr>
</table>

(来自http://www.w3schools.com/tags/tag_table.asp)

关于twitter-bootstrap - Bootstrap : table goes behind the borders,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12054608/

相关文章:

twitter-bootstrap - Bootstrap 控制内联对齐?

html - 更改 Bootstrap 进度条背景(不是进度条,而是进度条背景)

css - 如何使 Bootstrap img 响应保持在其父 div 的边界内

css - 搜索下拉建议

javascript - 对 Bootstrap 表中的可见行和相关隐藏行进行排序

html - 为什么输入字段没有以 (xxx) xxx-xxxx 格式显示?

jquery - Bootstrap 按钮单选按钮显示在列内

css - Bootstrap 3 : Cannot remove outline from link

html - 在 sing html 文件的不同部分使用不同的 Css 文件

javascript - 使用CSS忽略div元素下nav的显示