views:

50

answers:

2

I know Internet Explorer has always been hopeless with styling html <select> with inconsistent or non-existent font sizes, colours, borders, background colours etc so what are some alternatives for creating your own flexible field that is cross-browser compatible?

It's fine to require any JavaScript framework such as jQuery etc. I'm thinking a simply CSS menu almost acts fine as an alternative, with the "menu item" selected being added to a hidden field...

A: 

I guess drop down menu will do it easily with a hidden field as a data holder. Don't see any potential problems... well, except if JavaScript is turned off.

SeasonedCoder
+2  A: 

Why replace a perfectly functional native select box with keyboard navigation and all the good stuff for a homemade hackish solution that will make your site inaccessible for users with Javascript turned off or screen readers? If 99.9% of websites can manage to make their select boxes blend in, you should really just suck it up and style it as much as you can.

You could however look into this jQuery plugin which enhances select boxes in different ways.

Paolo Bergantino
Fair enough comment, but the limited styling options does entice you to look at alternatives.
Peter