﻿.autocomplete {
    /*the container must be positioned relative:*/
    position: relative;
    display: inline-block;
}

    .autocomplete input {
        border: 1px solid #aaa;
        padding: 1px;
        width: 100%;
        font-size: 15px;
    }

.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    /*position the autocomplete items to be the same width as the container:*/
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: scroll;
}

    .autocomplete-items div {
        padding: 4px;
        cursor: pointer;
        background-color: #fff;
        border-bottom: 1px solid #d4d4d4;
    }

        .autocomplete-items div:hover {
            /*when hovering an item:*/
            background-color: #e9e9e9;
        }
