Dimag Kharab
Dimag Kharab

Reputation: 4519

Chrome does not recognize height for SELECT option (Both jQuery & CSS)

I am unable to set height for select options with css or jQuery in chrome browser , while the same piece of code works in Firefox without any issue.

CSS

#select-jqry option{
    height: 50px;
}

HTML

<select id='select-jqry'>
    <option>One</option>
    <option>Two</option>
    <option>Three</option>
    <option>Four</option>
</select>

Even I tried with jQuery,

$('#select-jqry option').css('height','50px'); 

EDIT : Even Padding not working

DEMO

Upvotes: 6

Views: 9102

Answers (2)

Abhinav
Abhinav

Reputation: 8168

This is not possible in Chrome, according to the electric toolbox

Upvotes: 3

Cyril ALFARO
Cyril ALFARO

Reputation: 1681

Set height for option is not a valid behavior of CSS. If you really want to personalize your dropbox I recommend you to use this kind of libraries : http://bashooka.com/coding/9-useful-jquery-select-box-manipulation-plugins/

Personnaly I use DropKick and render are compatible with all browser and very customizable.

Upvotes: 0

Related Questions