how to apply style in a line inside a combobox ?

how to apply style in a line inside a combobox ?

  

I want to apply a line-through to a completed planning. I tried the style and class without success. Maybe the problem is related to the way I access each line in the if. I attached the screens to give more details from the widget. 

Someone know if combobox does not accept style to each line or another way to do that ?

Hi,


Combo Boxes are one of the hardest elements to style in html5 since most css customizations don't work at all in some browsers. So usually most solutions found in the net simulate a combo boxes with lots of css/javascript.


I tried and couldn't even get it to work in Chrome ...even though on my searches I only see people complaining about it not working on IE and safari.


The css should be something like this, and works in Edge and Firefox (see my fiddle):

select option {
  text-decoration:line-through
}


Regards,
João Rosado

Hi João,

   if I add a tag to the text ? Combobox could interpret it during presentation ?  I created a calculated field to join the values but I don´t know how this widget is internally ...  


Regards

Luck 

What browsers do you want to support?

Because unless you can get it work on them directly on html/css/javascript no point of trying to directly on the combo box widget.


The widget is similar as the one I set on the fiddle page, a "select" element with multiple "option" tags.

See if you can make it work there and post a link for your updated fiddle.


Regards

João Rosado,

I tried the code below but it does not work... I need show some elements with line-through and others without it...

I can only apply a style or class on select ?

<select name="test" >
    <option val="a">First Option</option> <style> text-decoration:line-through</style>
    <option val="b">Second Option</option>
    <option val="c">Third</option>
</select>


Regards 

Luck