blob: d56e08804d03225966bbe1fecb04dfe66b55c6e2 [file] [log] [blame]
Dani Vilardelld4bfb752020-09-21 21:32:55 +02001* { box-sizing: border-box; }
2body {
3 font: 16px Arial;
4}
5.autocomplete {
6 /*the container must be positioned relative:*/
7 position: relative;
8 display: inline-block;
9}
10input {
11 border: 1px solid transparent;
12 background-color: #f1f1f1;
13 padding: 10px;
14 font-size: 16px;
15}
16input[type=text] {
17 background-color: #f1f1f1;
18 width: 100%;
19}
20input[type=submit] {
21 background-color: DodgerBlue;
22 color: #fff;
23}
24.autocomplete-items {
25 position: absolute;
26 border: 1px solid #d4d4d4;
27 border-bottom: none;
28 border-top: none;
29 z-index: 99;
30 /*position the autocomplete items to be the same width as the container:*/
31 top: 100%;
32 left: 0;
33 right: 0;
34}
35.autocomplete-items div {
36 padding: 10px;
37 cursor: pointer;
38 background-color: #fff;
39 border-bottom: 1px solid #d4d4d4;
40}
41.autocomplete-items div:hover {
42 /*when hovering an item:*/
43 background-color: #e9e9e9;
44}
45.autocomplete-active {
46 /*when navigating through the items using the arrow keys:*/
47 background-color: DodgerBlue !important;
48 color: #ffffff;
Dani Vilardelld4f2c902020-09-23 13:54:19 +020049}
50