Easily change drop down arrow

Each browser displays select elements differently and it’s usually the one thing that will stop your forms from looking amazing.

Where is with a regular button it’s fairly easy to change it, changing the selector arrow is another story. Just look at some of the possible variations (and those are outdated)!

select-arrow-options
There are many tutorials out there to change the selector drop down. Unfortunately, many of them involve placing an image over the entire element or creating your own image and sticking it in the corner.

The below solution will work for all browsers and only take seconds to implement and only needs some CSS! You can see it in action on our contact page and blog

See the Pen qOmNPG by Alex (@fabriceleven) .

How does it work?

Simple, we hide the standard arrow, then we create “<>” text and just rotate it 90 degrees. So if in an example above you don’t like “<>” you can load whatever font you want and just display that element instead of our “>” arrows.

basic select html code

The CSS :

We will basically use the :after selector to add our new characters and rotate them. Since we are using absolute property to position the arrows your top div needs to have a relative property in it. The next thing is the magical appearance: none .selectdiv select {} It hides the standard button.

 

So the final magical CSS that will make this work is:

That’s it!
You can adjust the top and right values however you want  to adjust it for your design. You can of course change the color or remove the left line all together.

Make it more fancier

Now that we know how it works, it’s really easy to make things look way better by just including a different font. By adding a popular FontAwesome framework we can replace our “>” symbol with a down chevron. Because it’s a down chevron we don’t need to roate it like in our previous example. Here is the codepin:

 

See the Pen Styling select box with CSS + fontAwesome by Alex (@fabriceleven) .

Let us know where you used it and how it worked out.