使用引导程序在模式内的表中保持适当的列宽

时间:2014-11-25 16:13:37

标签: html css css3 twitter-bootstrap

如何保持下表中的行和行不超过modal-content类的边界?

我的HTML:

<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <h4 class="modal-title" id="myModalLabel">This is my model</h4>
        </div>
        <div class="modal-body">
        <table id="my_table" class="table-responsive filterable TF" width="auto">
            <tbody>
                <tr><td><a href="/1">Paaaa</a></td></tr>
                <tr><td><a href="/2">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</a></td></tr>
            </tbody>
        </table>
        </div>
    </div>
</div>

我的CSS:

.model-content {
    border-width: 2px;
    border-color: black;
}

1 个答案:

答案 0 :(得分:2)

使用;

#my_table td a {
    word-wrap: break-word;
}

打破界限。