Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to style the browser's autocomplete dropdown box?

http://dns.themeister.se/styleable.png

As you see, the whitebox are my often used usernames.

The autocompletion box has a white background. Is it possible to change it to whatever I want?

like image 663
Joakim Melin Avatar asked Jul 21 '12 21:07

Joakim Melin


People also ask

How do I style a select dropdown?

There are many ways to design a <select> dropdown menu using CSS. The Dropdown Menu is mainly used to select an element from the list of elements. Each menu option can be defined by an <option> element that can nested inside the <select> element.

How do I style a dropdown in HTML?

Example Explained HTML) Use any element to open the dropdown content, e.g. a <span>, or a <button> element. Use a container element (like <div>) to create the dropdown content and add whatever you want inside of it. Wrap a <div> element around the elements to position the dropdown content correctly with CSS.

How do I make an autocomplete drop down list in HTML?

You can try HTML <datalist> tag for autocomplete dropdown. Try here. If you don't want to add a default value in the dropdown or unselected dropdown then remove value attribute from the input tag.


2 Answers

It is not possible to modify the browsers' native functionality.

like image 114
EricG Avatar answered Oct 23 '22 11:10

EricG


One can't possibly style the autocomplete dropdown since it's not in the DOM.

like image 25
Igwe Kalu Avatar answered Oct 23 '22 12:10

Igwe Kalu