0

How to change arrow style in <select>. Changing background, font color or all border stuff is simple but how to change the "arrow" in? When i changed font color content color changed but the arrow stay black.

.language-choice{
    margin-top: 10px;  
    color: #719dd1;
    border-color: #719dd1; 
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border-width: 2px;
}
<select class="language-choice">
    <option value="en">English</option>
    <option value="pl">Polish</option>
</select>
Zim84
  • 3,404
  • 2
  • 35
  • 40
Faron
  • 123
  • 14
  • 1
    JSF is in the context of this question just a HTML code generator. HTML/CSS experts would have no idea what you're talking about when you only show the server-side code responsible for generating HTML/CSS output. Just show the generated HTML/CSS output right away (of course in MCVE flavor). I reframed the question for you so that it's easier answerable by HTML/CSS experts. Once you get the answer, then it's just a matter of rewriting server side code (JSF in your case) in such way that it produces exactly the desired HTML/CSS output. – BalusC Oct 01 '15 at 09:24
  • The style of arrow depends on the browser and the OS. Check this link to replace the default one. http://cssdeck.com/labs/styling-select-box-with-css3 – Varun Oct 01 '15 at 09:44

2 Answers2

2

you can try this one:

  .language-choice{
     width: 268px;
    padding: 5px;
    font-size: 16px;
    line-height: 1;
    border: 0;
     border-color: #719dd1; 
   -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border-width: 2px;
    height: 34px;
    background: url(http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png) no-repeat right #ddd;
    -webkit-appearance: none;
   -moz-appearance:    none;
   appearance:         none;
    background-position-x: 244px;
}

DEMO FIDDLE

Ivin Raj
  • 3,448
  • 2
  • 28
  • 65
0

You can try like this -

.selectWrap{
    position: relative;
    width: 100px;
}
.language-choice{
    /*margin-top: 10px;*/ 
    color: #719dd1;
    border-color: #719dd1; 
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    border: 2px solid #ccc;
    padding: 5px;
    width: 100%;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;

}
span{
    background: url('http://www.symantec.com/images/version-3/arrows/info-box-triangle-icon.png') #fff no-repeat center center / 13px 10px;
    height:13px;
    width: 25px;
    position: absolute;
    height: calc(100% - 4px);
    right: 2px;
    top:2px;
    border-radius: 0 3px 3px 0;
    pointer-events:none;
}
    <div class="selectWrap">
    <span></span>
        <select class="language-choice">
            <option value="en">English</option>
            <option value="pl">Polish</option>
        </select>
    </div>
Mukul Kant
  • 7,074
  • 5
  • 38
  • 53