Skip to content Skip to sidebar Skip to footer

How Css Increasing Line Spacing Between Select Box Elements

I would like to increase line spacing between select box elements. I try line-height and min-height but this does affect the select box elements spacing. Which property can I use?

Solution 1:

For 'select' elements using 'size' attribute (size greater than 0) try using padding on the options:

<selectmultiple><optionstyle="padding: 10px"value="1">Option 1</option><optionstyle="padding: 10px"value="2">Option 2</option><optionstyle="padding: 10px"value="3">Option 3</option><optionstyle="padding: 10px"value="4">Option 4</option></select>

Solution 2:

If you want spacing in elements of select box then apply css on elements not on select box.

Select box element is <option>

Use this css

select option { 
    line-height: 20px;
}

Post a Comment for "How Css Increasing Line Spacing Between Select Box Elements"