I am using the jquerys autocomplete widget , but I have several problems trying to style a field that falls out when looking for something.
I'm trying to move the block a bit and change the border color / bg, but some JS add some inline styles that override my .css styles. But I can’t find him.
I'v founded my this one .
<ul class="ui-autocomplete ui-menu ui-widget-content" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 11; display: block; width: 139px; top: 44px; left: 1101px; "><li class="ui-menu-item" role="menuitem">
To avoid use !important, you can add your styles with jQuery and override them that way.
!important
$('ul.ui-autocomplete').css({ color: 'red' });
Another solution would be to remove the style attribute from ul.
$('ul.ui-autocomplete').removeAttr('style');
css .css, , Firebug, , , !important; CSS.
!important;
.
ul.ui-autocomplete { color: red !important; }
- , jQuery - , , JS CSS.
! ; , - .
margin-top margin-left css
margin-top
margin-left
top left , , .
top
left
jquery, , , (jquery.ui.menu.css). , - , , .
http://docs.jquery.com/UI/Menu#theming
" , jquery.ui.menu.css, , , ." - jquery.
... ...
http://jqueryui.com/demos/autocomplete/#option-position
Check the file jquery.ui.theme.css,
jquery.ui.theme.css
the class .ui-widget-contentnear the top can be used to put the background color in the field of autocomplete search results, borders and positioning can also be changed through this class.
.ui-widget-content