Question

<table class="table table-striped table-bordered table-condensed">
        <tr>
            <th colspan="2">aaaaa</th>
        </tr>
        <tr>
            <td>cccccccccc</td>
            <td>dddddddddd</td>
        </tr>
    </table>

how to make "aaaaa" in the middle of the head of table in html with bootstrap?

Was it helpful?

Solution

Use .text-center

<tr>
    <th colspan="2" class="text-center">aaaaaa</th>
</tr>

http://jsfiddle.net/52VtD/2045/

OTHER TIPS

Just use the CSS style text-align and set it to center:

.table {
    text-align:center;
}

or if you just want table headers aligned to the center:

.table th {
    text-align:center;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top