Skip to content

Instantly share code, notes, and snippets.

@ahmed-hamdy90
Last active November 19, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmed-hamdy90/4f0d4b601ff7a5505519 to your computer and use it in GitHub Desktop.
Save ahmed-hamdy90/4f0d4b601ff7a5505519 to your computer and use it in GitHub Desktop.
Bootstrap 3 Style for JQuery Auto-Complete Widget
/* http://docs.jquery.com/UI/Autocomplete#theming*/
.ui-autocomplete {
position: absolute;
cursor: default;
background-color: #CCCCCC;
}
/* workarounds */
html .ui-autocomplete {
width:1px;
}
/* without this, the menu expands to 100% in IE6 */
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
.ui-menu-item a:hover {
color: #23527c;
}
/* make autocomplete suggestions menu is Scrollbar */
.ui-autocomplete {
max-height: 100px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
/* to hide helper status under text input which apply autocomplete */
.ui-helper-hidden-accessible {
position: absolute;
left:-999em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment