tags:

views:

221

answers:

4

Why <td align="center">5</td> not overriding on table.finTable tbody tr td {text-align:right;}

+1  A: 

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
+1  A: 

Inline CSS styles override CSS, but inline attributes are not always overrided.

Change your td to style="text-align:center" instead of align="center"

SLC
A: 

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
A: 

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?

Shivendra