Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Nathan Meek
PLUS
Nathan Meek
Courses Plus Student 957 Points

Firefox 30.0 no longer listens to <select> style overrides

Hi, I have recently upgraded to FF 30.0 and have now noticed that removing of <select> dropdown lists arrow no longer work.

I was using the following FF override to hide the browser arrow in favour of using Font Awesome glyph :

-moz-appearance: none; text-indent: 0.01px; text-overflow: '';

This used to work but according to Mozilla community the '-moz-appearance' attribute is no longer listened to.

My question is this : 'Has anybody else noticed this change and have they managed to find a solution to the problem?'

All other browsers are displaying correctly (apart from older IE; but that was inevitable).

Many thanks in advance.

2 Answers

James Barnett
James Barnett
39,199 Points

Use overflow: hidden and width: 110%, I didn't come up with this I just read it on the web.

I made a codepen you can test out http://codepen.io/jamesbarnett/full/JhHjK

For reference here are the various hacks to remove the drop down arrow, the class names of course assume you've structured your HTML as I did in the codepen.


firefox

@-moz-document url-prefix(){
  .styled-select select { width: 110%; }
}

IE 8 & 9

<!--[if (gte IE 8)&(lte IE 9)]>
   <style type="text/css">
      .styled-select select { width: 110%; }
   </style>
<![endif]-->

IE10+

.styled-select select::-ms-expand { display: none; }

Chrome, Safari and Opera 14+

.styled-select select { -webkit-appearance: none; }

Opera >14

_:-o-prefocus, .selector {
     .styled-select { background: none; }
  }

gracefully degrade on IE6 & 7

<!--[if (gte IE 6)&(lte IE 7)]>
   <style type="text/css">
      .fa-sort-desc { display: none;}
   </style>
<![endif]-->