The selectbox mystery of WordPress

The other day I wanted to use a selectbox with 5 elements in my plugin’s option page. No problem I thought:


What everybody including me expects is something like this:

But I actually got this:

The mystery lies in the style sheet for the admin area:

#wpcontent select {
	padding: 2px;
	height: 2em;
	font-size: 12px;
}

This forces every selectbox to display only one element. I have no idea why this is implemented. There is also a ticket in the WP tracking system discussing this behaviour since two years.

The solution to this problem is quite easy:

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)