Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the height of a SELECT in IE

IE seems to ignore the height set in CSS when rendering a HTML SELECT. Are there any work around's for this or do we have to just accept IE will not look as good as other browsers?

like image 549
Craig Avatar asked Jan 29 '09 00:01

Craig


2 Answers

There is no work-around for this aside from ditching the select element.

like image 55
Ken Browning Avatar answered Sep 24 '22 21:09

Ken Browning


It is correct that there is no work-around for this aside from ditching the select element, but if you only need to show more items in your select list you can simply use the size attribute:

<select multiple="multiple" size="15">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>

Doing this you'll have additional empty lines if your collection of items lenght is smaller than size value.

like image 35
JackNova Avatar answered Sep 24 '22 21:09

JackNova