I have always used the "trick":
select {
-moz-appearance: none;
text-indent: 0.01px;
text-overflow: '';
}
to do custom select boxes on FF but since version 30 is released this stopped working completely. I have tried to find if this was deprecated but couldn't find anything. Is there a workaround, or another method to replace this?
One option is to wrap the
select
elements in container elements withoverflow: hidden
. Increase the width of theselect
elements to push the down arrow to the right and out of the picture. Then add a border to the container elements that matches theselect
elements.The problem is that that this will affect styles set on
focus
or validation errors, which is why I ended up doing what totas suggested and covering the arrows with pseudo-elements.Yes ! Is good ! Thks
JS FIDDLE
You can use this solution for firefox, using vendor pseudo class :-moz-any() and pointer events only for mozilla and do not affect other browsers, because both is valid since version 3.6.
here is a jsbin example http://jsbin.com/pozomu/4/edit
Although it's a quite dirty hack, you can fix this by adding another overlay element above the arrow down in the CSS of your select wrapper (in my case .form-control-select):
My HTML:
The response provide by Mozilla Firefox to this issue is just unacceptable. The browser is broken and is nothing more than an open sore for malicious code. They promote the V29-30 browser as a security update, but it took over a week since the release date for a notification to appear for V30.
My own response will be to do nothing and I encourage all other developers to do the same. Eventually users will get tired of the design inconsistencies and abandon Mozilla Firefox like they have been in even greater numbers.
If a reasonable support request is meet with sheer contempt and other browsers can do it but Mozilla Firefox no longer can. It’s not me that has to fix my code, but Mozilla Firefox has to fix theirs!
I fixed my this issue by giving some style to div and select individually.
Anyone can change his width and other style properties a/c to needs. :)
Here is the js fiddle for it. JSFIDDLE tested on all the browsers.
select::-ms-expand for IE and -webkit-user-select: none for chrome.