Please take a look at my multi-column autocomplete textbox I have in this jsFiddle link:
Note that as the user types a color name, a drop-down list appears. I want to make it so that the user’s current search string is bolded in each of the entries in the drop-down list. For example, if the user types “ant” (without quotes), there are two possible items: Antique Brass and Eggplant. I want the search results to look like this:
Yes, as far as most if not all browsers are concerned “forms” are more part of the browser than they are part of a page.
AFAIK this is so a user will “recognize and be familiar with” a form.
I’ve found that some elements can sometimes be styled in some ways for some browsers.
But trying to do so is an exercise in frustration. (notice all the “somes” there?)
When it’s not an actual dropdown list and you are instead simulating one the hard way, by editing the library files no less, then yes it works that way.
There are several sins that are being committed here to make it work though, which I hope others around here will have the time to cover in greater depth.
One of the things that was done wrong was on our part, for assuming that an autocomplete dropdown list was based on the HTML specifications for a dropdown select box.
The only other thing that has been done wrong is to edit the library code for the multicolumn autocomplete widget. When someone else is looking after the project, or even yourself in a year or two, that library may be updated to a newer version of the multicolumn autocomplete. After which at some stage someone might notice that the bold stuff doesn’t work any more.
Much better solutions exist where the library code is left as is, and separate code is used to provide the improved behaviour that you are after.
The benefit of doing things this way is that the changes are easier to see, and update.
We can even use a more recent version of the library, just by updating the external resource from version 2.1 of the multicolumn autocomplete to version 2.2, and our code still continues to works too.