Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to align a th in bootstrap table

so Ive some issues with a bootstrap's table. TH dont align, and i dont know what to do.

the result is like this table:

Bootstrap

my CSS is a simple

#tabela{
    text-align: center;
}
like image 280
LMaker Avatar asked Feb 09 '23 10:02

LMaker


2 Answers

if you are using bootstrap give a class of text-center in th:

<th class="text-center">Content</th>
like image 101
cos nik Avatar answered Feb 19 '23 21:02

cos nik


Set the property text-align on the TH element directly to overwrite bootstraps styling.

#tabela tr th,
#tabela tr td {
    text-align: center;
}
like image 44
Frankey Avatar answered Feb 19 '23 23:02

Frankey