Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line-through css styling for Option in Select Box is not working on Google Chrome but working fine on Firefox [closed]

I added the !important tag to the line-through styling in Google Chrome but it didn’t seem to work. Is there a solution or a work around that could solve this issue?

like image 616
AlGallaf Avatar asked Nov 17 '13 12:11

AlGallaf


1 Answers

The <del> tag carries the line-through or strike-through styling by default, and you may use it directly to strike-through the text in your markup.

The following CSS should be used to give a separate element the line-through styles (eg. <span>, <div> etc.):

.line-through {
    text-decoration: line-through;
}

And in the markup, you may use the above defined CSS as:

<span class="line-through">Deleted text</span>

The above mentioned examples work seamlessly on every browser without adding an !important with the styles. Check out this fiddle for a quick demo. Please share your code if possible, would be helpful to figure out the actual problem.

like image 97
Rahul Avatar answered Oct 01 '22 20:10

Rahul