4

I am using a WebView inside one of my programs and there is a <select> tag inside the HTML page I'm rendering. I would like to add icons to the <option> elements it contains, like this:

Screenshot of a dropdown list with icons

(The shadow effect is not there, so it can be easy to miss out that this is a dropdown list; but it is.)

Is that possible? All my efforts to style <option> tags or put images in them so far have failed.

Since it's not ever going to be displayed by another rendering engine, I only need it to work with the WebKit. I'm also fine with a solution that involves WebView trickery and that would never work in a browser, although it would be kinda neat if it did work in a browser too.

zneak
  • 134,922
  • 42
  • 253
  • 328

1 Answers1

0

This is not possible in webkit browsers using just css at this point in time. It is possible in Firefox, but not webkit.

You will need to use javascript to replace the select box with stylable elements.

The following post answers this:
How to add a images in select list

Community
  • 1
  • 1
3dgoo
  • 15,716
  • 6
  • 46
  • 58