Home > Mobile >  Remove styling applied by <del> tag
Remove styling applied by <del> tag

Time:10-13

I have a price tag element with <del> tag. The strikethrough line isn't centered.

The following question and answers were helpful in understanding about how these styles are applied. I have tested the answer myself and it works fine and strikethrough can be centered the way I want.

CSS: Strike-through not centered through the text

.strike-center:after {
    border-top: 1px solid #000;
    position: absolute;
    content: "";
    right: 0;
    top:50%;
    left: 0;
}

http://jsfiddle.net/urjhN/

How do I remove the existing style applied by the <del> tag?

CodePudding user response:

The following should do it:

del {
   all: unset;
}

Have a look around for modern css reset https://elad2412.github.io/the-new-css-reset/

  • Related