Creating cross browser drop downs from Uls instead of <select>
Hello I am looking for a tutorial on creating consistent cross browser drop downs, other form elements se开发者_如何学运维em pretty easy to style. I am wondering if I can get away with somehow styling the select tag from css or do I have to rewrite all the selects to unordered lists
The selectbox is not very good stylable with CSS, it's a system UI element. The only chance to style it the way you like is to create an alternative HTML-/CSS-/JavaScript construct
You can alter the background- and border-settings and stuff like fonts etc, but the overall look & feel, especially the triangle, is not customizable, at least not in all browsers.
To use a JavaScript-based solution here is one that works with jQuery:
http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/index.html
Ended up rolling my own dropdowns with ul, li and css hover and some javascript for the form submission
精彩评论