+ 2

How to change the text align in a table?

in the <table> tag align only changes the table postion as whole

26th Jun 2016, 11:49 AM
Ahmed Abdelwadod
Ahmed Abdelwadod - avatar
3 Réponses
+ 2
You shouldn't use HTML for layout or style at all. Use CSS. The text style (class) should be added to the table cell <td> or <th>. Example: th, td { padding: 0.5em; text-align: center; }
27th Jun 2016, 2:55 AM
ZinC
ZinC - avatar
0
try setting a class to a specific piece of text <a class="text"> text </a>
26th Jun 2016, 1:51 PM
Dale Hogg
Dale Hogg - avatar
0
in html. <table> <tr> <td><center>text in table</center></td> </tr> </table> in css th, td { text-align: center; } you can used more align. ex: left, center, justify, right
27th Jun 2016, 3:12 AM
suhendra fajrianor
suhendra fajrianor - avatar