Using ie8's own dev tools it shows the elements text-align value as left, but it is rendered centered in ie8 standards mode. In quirks or ie7 standards, everything is correctly aligned left.
To center text in CSS, use the text-align property and define it with the value 'center. ' You can use this technique inside block elements, such as divs. You can also center text in HTML, which is useful if you only want to center individual elements on the page on a case-by-case basis.
Select the text that you want to center. in the Page Setup group, and then click the Layout tab. In the Vertical alignment box, click Center. In the Apply to box, click Selected text, and then click OK.
A very elegant solution from haslayout.net:
th {
text-align: inherit;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With