I am using this jQuery UI combobox autocomplete control out of the box off the jQuery UI website:
My issue is that I have multiple comboboxes on a page, and I want them to have different widths for each one.
I can change the width for ALL of them by adding this CSS:
.ui-autocomplete-input
{
width: 300px;
}
but I can’t figure out a way to change the width on just one of them.
A simple
works (I tried it on the linked page with Firebug) to change the first one on the page.
You can do something like:
To change the Nth one.
To find a specific one by a characteristic, you could do it in many ways.
Find it by the first “option” (in this example “asp”):
Find it by its “label”:
etc…
I’ll update if you have an idea of how you want to find your combobox.
EDIT FOR COMMENT
oo, that makes it even easier. From the example source you linked to, the HTML is already wrapped in a div:
I would give that div a unique id then:
That selects child elements of your div that are inputs with a class of “ui-autocomplete-input”.