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:

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:

Seems easy but costed me over 1 hour of my lifetime.

One thought on “The selectbox mystery of WordPress”

Leave a Reply

Your email address will not be published. Required fields are marked *