Hi All,
I want give some space between the items of the dropdownlist. is it possible?
ex:
ddl:
item1
item2
item3
Hi All,
I want give some space between the items of the dropdownlist. is it possible?
ex:
ddl:
item1
item2
item3
You should use CSS.
example:
select option
{
line-height: 35px;
}
Try like this
comboBox1.Items.Add("item1");
comboBox1.Items.Add("");
comboBox1.Items.Add("item2");
comboBox1.Items.Add("");
comboBox1.Items.Add("item3");
comboBox1.Items.Add("");
If you mean a <select>
, no this isn't possible, at least not in a cross-browser way (unless you add empty, selectable <option>
elements, which I wouldn't guess that you want in there.
To do this you need to use something that replaces the <select>
with stylable elements, here are some options: