Why <td align="center">5</td>
not overriding on table.finTable tbody tr td {text-align:right;}
Asked
Active
Viewed 8,901 times
4

Jitendra Vyas
- 148,487
- 229
- 573
- 852
4 Answers
5
Inline CSS styles override CSS, but inline attributes are not always overrided.
Change your td to style="text-align:center"
instead of align="center"

NibblyPig
- 51,118
- 72
- 200
- 356
1
CSS has precedence over old-style attributes.
At least it should be that way, so that older (now no more existent) browsers that does not understand CSS can render the content with old-style attributes, while newer browsers (all browsers nowadays) will render using CSS.

baol
- 4,362
- 34
- 44
1
CSS rules take higher precedence than element attributes. If you want to override it, use an inline style rule:
<td style="text-align: center;">5</td>

cmptrgeekken
- 8,052
- 3
- 29
- 35
0
inline style overrides style through css. align="center" being inline has higher precedence and is not overridden.
btw, why would you give an element an inline style when you want it overridden through your style sheet?

ssingh3
- 125
- 1
- 8