Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize HTML <select> with CSS [duplicate]

Possible Duplicate:
Is it possible to style a select box?

I'm searching for a way to customize a select element in my HTML code. I wanted my select to look like this:

enter image description here

I want the user to be able to see an image and two texts, which represents the first element of my list. Since this is supposed to be accessed by a smartphone (Android and Blackberry), I believe the list will open in the operating system component, so I don't have to bother styling the remaining options of my select, right? What is the best way to accomplish this?

Thanks a lot in advance!

like image 215
Rui Avatar asked Nov 05 '22 10:11

Rui


1 Answers

I don't think you can accomplish quite as much as you want with just css styling a <select> tag. This is about how far it goes: http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/

I would suggest using other elements, like <div>s to accomplish what you want, and a little bit of javascript (jQuery, MooTools) for the added effects.

like image 161
kasimir Avatar answered Nov 09 '22 07:11

kasimir