views:

41

answers:

3

Hi All,

I want give some space between the items of the dropdownlist. is it possible?

ex:

ddl:

    item1

    item2

    item3
A: 

You should use CSS.

example:

select option
{
    line-height: 35px;

}
TheGeekYouNeed
You can't style a `<select>` cross-browser. `option` just shouldn't appear in your stylesheet unless it's for fonts.
Nick Craver
+1  A: 

Try like this

        comboBox1.Items.Add("item1");
        comboBox1.Items.Add("");
        comboBox1.Items.Add("item2");
        comboBox1.Items.Add("");
        comboBox1.Items.Add("item3");
        comboBox1.Items.Add("");
Pramodh
+1  A: 

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:

Nick Craver