• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 681
  • Last Modified:

Styling Select Box Drop Down

I'm trying to figure out how to style this select drop down box like the attached image.  I've got it close, but still can't figure out how to make the vertical line and the smaller black arrows in the image.

Here is my current code and output:
http://jsfiddle.net/gallitin/3xReG/

<style>
select
{
color: #808080;
font-family: myriad-pro-condensed,sans-serif;
font-size: 14px; 
width:150px;
padding:5px;
}
</style>
<select>
    <option>FILTER</option>
</select>

Open in new window

style-select.jpg
0
Nathan Riley
Asked:
Nathan Riley
1 Solution
 
COBOLdinosaurCommented:
You can probably do it wit a background image, but I suspect that it will break the control at that point and you will have to use a hack using scripting and an image swap to simulate the control.

If you want to do that kind of a hack you can probably find something already written using Google.  If you are going to re-invent the world there is no need to re-invent the tools to re-invent the wheel.

Trying to turn a select in to some stylistic bauble has more down side then any possible benefit.  You are just going to harm accessibility, usability, reliability with what you are trying to do.

Cd&
0
 
Chris StanyonCommented:
Because a <select> element is part of the browser chrome, you won't be able to style it consistently. Normally when you see nicely styled dropdowns like this, the page uses javascript to create something that resembles a drop down. If you look behind the scenes, you'll often find that they're not <select> elements at all - often they'll be buttons, and lists with javacript events wired in to give the impression of a dropdown.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now