2

I have the drop down list, and i want to strike through the specific option. I'm using the below sample code, the red color is working fine but line-through is working in IE, but not working in chrome

<select>
<option>option 1</option>
<option style="text-decoration:line-through; color:red;">option 2</option>
<option>option 3</option>
</select>

I want to apply this without any jquery or any other library, just by directly through JavaScript & css

Mathiyazhagan
  • 1,389
  • 3
  • 13
  • 37

1 Answers1

1

A crude but working way to do this would be to just use a Unicode text generator like this one http://adamvarga.com/strike/. And it would end up working like this:

    <select>
        <option>option 1</option>
        <option>s̶t̶r̶o̶k̶e̶n̶</option>
        <option>option 3</option>
    </select>
I am guessing it's a bug in chrome from what people before me wrote
Linushg111
  • 76
  • 7