Solved

Styling Select Box Drop Down

Posted on 2013-11-01
2
662 Views
Last Modified: 2013-11-04
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
Comment
Question by:N R
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39618053
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
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 500 total points
ID: 39618749
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question