Span inside td does not override td style

css, html

Solution

Cannot remove the underlined style for descendants.

http://www.w3.org/TR/CSS21/text.html#lining-striking-props

The 'text-decoration' property on descendant elements cannot have any effect on the decoration of the ancestor.

Problem

I have a `span` tag inside a `td`. The `td` has a class with CSS to set the `text-decoration` to `underline`, while the `span` sets the `text-decoration` to `none`. I expect the text inside the `span` to not be underlined, but for some reason it is. Why? ``` .u { text-decoration: underline; } .no-u { text-decoration: none !important; } ``` ``` <table> <tr> <td class="u"> <span class="no-u" style="text-decoration: none !important;">My Text</span> </td> </tr> </table> ```

Original source

Related problems