Jeg fandt på CSSdesk denne fine dropdown til at søge efter ord. Men det viser sig så, at man ikke kan klikke på a href linket og hvis man gør, forsvinder søgefeltets resultat bare.. Nogen der har en løsning?
Demo:
http://cssdeck.com/labs/search-box-with-suggestions-dropdownCSS kode
- .ibsearch {
- position: relative;
- margin: 0 auto;
- width: 300px;
- }
-
- .ibsearch input {
- height: 26px;
- width: 100%;
- padding: 0 12px 0 25px;
- border-width: 1px;
- border-style: solid;
- border-color: #a8acbc #babdcc #c0c3d2;
- border-radius: 13px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
- -o-box-sizing: border-box;
- box-sizing: border-box;
- -webkit-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
- -moz-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
- -ms-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
- -o-box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
- box-shadow: inset 0 1px #e5e7ed, 0 1px 0 #fcfcfc;
- }
-
- .ibsearch input:focus {
- outline: none;
- border-color: #66b1ee;
- -webkit-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
- -moz-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
- -ms-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
- -o-box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
- box-shadow: 0 0 2px rgba(85, 168, 236, 0.9);
- }
-
- .ibsearch input:focus + .results { display:block; }
-
- .ibsearch .results {
- width:400px;
- display: none;
- position: absolute;
- top: 35px;
- left: 0;
- right: 0;
- padding: 0;
- margin: 0;
- border-width: 1px;
- border-style: solid;
- border-color: #cbcfe2 #c8cee7 #c4c7d7;
- background-color: #fdfdfd;
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fdfdfd), color-stop(100%, #eceef4));
- background-image: -webkit-linear-gradient(top, #fdfdfd, #eceef4);
- background-image: -moz-linear-gradient(top, #fdfdfd, #eceef4);
- background-image: -ms-linear-gradient(top, #fdfdfd, #eceef4);
- background-image: -o-linear-gradient(top, #fdfdfd, #eceef4);
- background-image: linear-gradient(top, #fdfdfd, #eceef4);
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- -ms-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- }
-
- .ibsearch .results li { display: block;}
-
- .ibsearch .results li:first-child { margin-top: -1px }
-
- .ibsearch .results li:first-child:before, .ibsearch .results li:first-child:after {
- display: block;
- content: '';
- width: 0;
- height: 0;
- position: absolute;
- left: 50%;
- margin-left: -5px;
- border: 5px outset transparent;
- }
-
- .ibsearch .results li:first-child:before {
- border-bottom: 5px solid #c4c7d7;
- top: -11px;
- }
-
- .ibsearch .results li:first-child:after {
- border-bottom: 5px solid #fdfdfd;
- top: -10px;
- }
-
- .ibsearch .results li:first-child:hover:before, .ibsearch .results li:first-child:hover:after { display: none }
-
- .ibsearch .results li:last-child { margin-bottom: -1px }
-
- .ibsearch .results a {
- display: block;
- position: relative;
- margin: 0 -1px;
- padding: 6px 40px 6px 10px;
- color: #808394;
- font-weight: 500;
- text-shadow: 0 1px #fff;
- border: 1px solid transparent;
- border-radius: 3px;
- }
-
- .ibsearch .results a span { font-weight: 200 }
-
- .ibsearch .results a:before {
- content: '';
- width: 18px;
- height: 18px;
- position: absolute;
- top: 50%;
- right: 10px;
- margin-top: -9px;
- }
-
- .ibsearch .results a:hover {
- text-decoration: none;
- color: #fff;
- text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
- background-color: #7eccc2;
- -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
- -moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
- -ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
- -o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
- box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 1px rgba(0, 0, 0, 0.08);
- }
-
- .lt-ie9 .ibsearch input { line-height: 26px }