CSS line-through is not disabled on nested span

css, html

Solution

li.done span {
    text-decoration: none;
    background: #ff0;
    display: inline-block; /* This solved the problem.*/
}

Reason: Unknown

Problem

CSS : ``` ol { margin: 0 30px; } li { margin: 15px 0; } li.done { text-decoration: line-through; } li.done span { text-decoration: none; background: #ff0; } ``` HTML : ``` <ol> <li class="done">Hello <span>World</span></li> <li>World</li> </ol> ``` JSFiddle Demo : http://jsfiddle.net/pZye7/5/ . And something weird on JSFiddle, ordered list's numbers are not displayed. My requirement : the word "World" should not have the line-through on it.

Original source

Related problems