tags:

views:

43

answers:

2

I know it's possible with jquery to make something that looks like a select box so I can make it look however I want. However, with just css, how much control do I have?

I use border, padding, and width, and the end result looks great.

The only thing that bothers me is the part that drops down. Is there any control over this? (It looks dumb to have padding and on the drop down list have none).

+2  A: 

There is no cross-browser way to style the drop down. Have a look at these alternatives:

Sarfraz
He specifically mentioned "just CSS".
dalbaeb
@dalbaeb: Can you do that in CSS only?, yes? show me please !
Sarfraz
@dalbaedb: Also, he said *with just css, how much control do I have?* not *only css*
Sarfraz
+3  A: 

You have some control, but there is quite a bit of variation between browsers and operating systems. For example, Internet Explorer on Windows will always show the standard grey down arrow, even though you can re-colour this in other browsers.

As for the part that drops down - these are option tags, not select; so to change them you'll be applying styles to the option tag instead:

select {
   border: 1px solid red;
}

option {
   background-color: blue;
}

Luckily some other people have done some research detailing what works and what doesn't, so here are some resources for you:

Tim Fountain