How to remove the arrow from a <select> tag in Firefox


SUBMITTED BY: Guest

DATE: Nov. 13, 2013, 9:25 p.m.

FORMAT: Text only

SIZE: 1.7 kB

HITS: 828

  1. How to remove the arrow from a <select> tag in Firefox
  2. #dropdown {
  3. -webkit-appearance: none;
  4. -moz-appearance: none;
  5. appearance: none;
  6. padding: 2px 30px 2px 2px;
  7. border: none;
  8. background: transparent url("http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png") no-repeat right center;
  9. }
  10. select {
  11. overflow:hidden;
  12. width: 120%;
  13. }
  14. -moz-appearance: window;
  15. select {
  16. -webkit-appearance: normal;
  17. -moz-appearance: normal;
  18. appearance: normal;
  19. }
  20. .selectwrap { position: relative; }
  21. .selectwrap:before {
  22. content: "";
  23. height: 0;
  24. width: 0;
  25. border: .9em solid red;
  26. background-color: red;
  27. position: absolute;
  28. right: -.1em;
  29. z-index: 42;
  30. }
  31. .select {
  32. opacity : 0;
  33. width: 200px;
  34. height: 15px;
  35. }
  36. <select class='select'>
  37. <option value='foo'>bar</option>
  38. </select>
  39. .div {
  40. width: 200px;
  41. height: 15px;
  42. position: absolute;
  43. z-index: 0;
  44. }
  45. <div class='.div'>{the text of the the current selection updated by javascript}</div>
  46. <select class='select'>
  47. <option value='foo'>bar</option>
  48. </select>
  49. $('.select').click(function(event)) {
  50. $('.div').html($('.select option:selected').val());
  51. }
  52. body {
  53. scrollbar-face-color: #6685CA;
  54. scrollbar-highlight-color: #6685CA;
  55. scrollbar-shadow-color: #6685CA;
  56. scrollbar-3dlight-color:#FFFFFF;
  57. scrollbar-arrow-color:#FFFFFF;
  58. scrollbar-track-color:#E5E5E5;
  59. scrollbar-drakshadow-color:#000000;
  60. }

comments powered by Disqus