gogoWebsite

How to adapt to the width of the bootstrap table

Updated to 21 days ago

This article refers to this article/q/1010000009900107

  1. There are many table fields, and the table cannot be displayed 100% of the page width.

  2. Now I want the table width to determine the width according to the content. (It doesn't matter if the page appears)

  3. Don't change the form content


<div class=table-responsive">
    <table class="table text-nowrap">
        <thead>
            <tr>
                <th> ... </th>
                ....
            </tr>
        </thead>
        <tbody>
            <tr>
                <td> ... </td>
                ....
            </tr>
            .....
        </tbody>
    </table>
</div>
Among them, the form needs to be added table style, text-nowrap Control content without changing lines, the outer layer of the table must have <div class="table-responsive"> . In the table thead and tbody Cannot be omitted, otherwise the Bootstrap table style will not be used.