From 28ee93d735879dbf07c9a3549712f35bd8832da9 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Sun, 28 Jul 2019 18:34:21 -0400 Subject: Typeahead and search --- static/ihatecss.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'static/ihatecss.css') diff --git a/static/ihatecss.css b/static/ihatecss.css index 6ef2b35..263ef4d 100644 --- a/static/ihatecss.css +++ b/static/ihatecss.css @@ -8,3 +8,53 @@ body { margin-top: auto; background:#999; } + +* { box-sizing: border-box; } +body { + font: 16px Arial; +} +.autocomplete { + /*the container must be positioned relative:*/ + position: relative; + display: inline-block; +} +input { + border: 1px solid transparent; + background-color: #f1f1f1; + padding: 10px; + font-size: 16px; +} +input[type=text] { + background-color: #f1f1f1; + width: 100%; +} +input[type=submit] { + background-color: DodgerBlue; + color: #fff; +} +.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; +} +.autocomplete-items div { + padding: 10px; + cursor: pointer; + background-color: #fff; + border-bottom: 1px solid #d4d4d4; +} +.autocomplete-items div:hover { + /*when hovering an item:*/ + background-color: #e9e9e9; +} +.autocomplete-active { + /*when navigating through the items using the arrow keys:*/ + background-color: DodgerBlue !important; + color: #ffffff; +} -- cgit v1.2.3