Wrong line in accepted answer:
Any setting of the design of the text to the Block of descendants can never "cancel" the text decorations of the ancestor window.
Never say never, right?
I have not yet found a solution for IE (unless you are working with a script in which the strikethrough style is set to <TD> ), however this is possible for other browsers, although you will have to fight with the side effects of the solution.
See for yourself at http://result.dabblet.com/gist/3713284/
In short: just add display:table; in child style. For some reason in FF you can use any of table , block , list-item or table-caption , but they do not work in Safari / Chrome.
It uses the following code:
<span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red;">Undesired strikethrough</a> </span> <div style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: table;">display: table in a div</a> </div> <span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: table;">display: table in a span</a> </span> <span style="text-decoration:line-through; display: block;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: table;">display: table in a span with "display:block;"</a> </span> <span style="text-decoration:line-through; display: table-cell;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: table;">display: table in a span with "display:table-cell;"</a> </span> <span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: list-item;">display: list-item</a> </span> <span style="text-decoration:line-through;"> Dead Text <a href="#" style="text-decoration:underline;color:Red; display: table-caption;">display: table-caption;</a> </span>
Potherca Dec 07 2018-10-14 14:46
source share