-1

I have to implement the following dropdown box. The first item in the list can't selected and the data will be populated dynamically.

Dropdown to be implemented

Cœur
  • 37,241
  • 25
  • 195
  • 267
Subrat
  • 881
  • 1
  • 11
  • 19

1 Answers1

1

I think you're looking for an optgroup

<select>
  <optgroup label="Choose Types">
    <option>All Types</option>
    <option>CAR</option>
    ...
  </optgroup>
  ...
</select>
Brad Christie
  • 100,477
  • 16
  • 156
  • 200
  • it works. Can you please tell me how to resize the select popup shown in the above picture? thanks. – Subrat Jan 24 '11 at 22:22
  • Without breaking it off it to a floating div or some kind of popup mechanism, you're not going to be able to. stock controls use the original width as the width of the drop-down. You can take a look at [ComboBox alternatives](http://stackoverflow.com/questions/195270/professional-jquery-based-combobox-control) though. – Brad Christie Jan 24 '11 at 22:40