Using this Q http://stackoverflow.com/questions/17838380/styling-jquery-ui-autocomplete
I was able to style all auto completes on my site. However I only want to apply WIDTH style to one particular auto-complete text field.
<script>
$( function() {
var availableCountries = [
"Country1",
"Country2",
"Country3",
];
$("#tbCountries").autocomplete({
source: availableCountries
});
} );
</script>
<input id="tbCountries" type="text" class="textEntry form-control RegistrationPage-AutoCompleteCountryWidth" maxlength="30">
Ive tried accessing it through the ID of the input and also adding a class
#tbCountries ul
{
width:14% !important;
}
.RegistrationPage-AutoCompleteCountryWidth ul
{
width:14% !important;
}
None of these work....BUT...by getting the ID of the ul from the developer tools I can change the desired width to
#ui-id-1
{
width:14% !important; WORKING
}
However, isnt this bad coding so to speak as adding or removing more auto completes from my site could change the id of this one?
Any Ideas? Ta