?
Solved

Styling Select Box Drop Down

Posted on 2013-11-01
2
Medium Priority
?
674 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:Nathan Riley
[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 2000 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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

762 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