0

Defaultly, when you input something to text field, you get suggestions with values you entered before. So my question is, is it possible to use CSS to modify appereance of that suggestion dropdown. Or could you please suggest javascript code to recreate its bahavior?

Anagmate
  • 1,825
  • 3
  • 16
  • 15

2 Answers2

0

You can't fiddle with the native browser's autocomplete box, but you can with custom implementations. I'd wager the most popular is this one: http://jqueryui.com/autocomplete/

I should note that the custom implementation won't serve up values the user has entered before unless you are capturing each term the user is entering, and use that list to populate your autocomplete box.

Mister Epic
  • 16,295
  • 13
  • 76
  • 147
0

No, it is browser's native implementation. the browser doesn't even add or modify any new DOM element therefore you can not style the dropdown list. I am not 100% sure but it looks like the drop down list is on a different layer on top of the display page. You will need to have a your own Javascript implementation of autocomplete.

By the way to disable this browser behavior, add this to the input element:

autocomplete="off"

Note that not all browser support autocomplete attribute

David Lin
  • 13,168
  • 5
  • 46
  • 46