Alex Rivera | Logout

Setting the height of a SELECT in IE

Asked 2009-01-29T00:24:44.813
29

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?

Edit
Report

5 Answers

3

Use a UI library, like jquery or yui, that provides an alternative to the native SELECT element, typically as part of the implementation of a combo box.

answered 2009-01-29T01:34:06.607
3

Even though setting a CSS height value to the select element does not work, the padding attribute works alright. Setting a top and bottom padding will make your select element look taller.

answered 2011-07-04T11:48:12.327
3

Finally found in http://viralpatel.net/blogs/2009/09/setting-height-selectbox-combobox-ie.html a simple solution (at least for IE8):

font-size:      1.0em;

BTW, for Google Chrome, found this workaround at How to standardize the height of a select box between Chrome and Firefox? */

-webkit-appearance: menulist-button;
answered 2012-06-02T14:48:07.023
2
select{
  *zoom: 1.6;
  *font-size: 9px;
}

If you change properties, size of select will change also in IE7.

answered 2012-12-06T13:56:22.543
1

See also inconsistent box model between input, select, ...

answered 2010-10-25T09:08:32.677

Your Answer