How to change select box DROP DOWN ARROW using CSS

jquery-plugins.net

* {
    margin:0;
    padding:0;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#pie_register_reg_form  select::-ms-expand {
    display: none; /* hide default arrow in IE10 */
}

#pie_register_reg_form  select {
    width: 50%; /* Set width. Do not set height else it will fail in IE8-10. Use padding for height. */
    color: #333;
    font-weight: normal;
    font-size: 1em;
    line-height:1.2em;
    margin: 0 0 10px;
    padding: 6px 0; /* use this to set a specific height for your dropdown (DO NOT use the attribute 'height') */
    border: 0 none;
    cursor: pointer;
    text-indent: 0.01px;
    text-overflow: "";
    background: url('images/arrow.png') no-repeat 100% 4px #fff; /* add your own arrow image */
    *background-image:none; /* turn bg image for IE7 */
    background: url('../images/arrow.png') no-repeat 100% 0px #fff; /* fallback bg image*/
    background: url('../images/arrow.png') no-repeat 100% 0px, -webkit-linear-gradient(top, #fff, #fff);
    background: url('../images/arrow.png') no-repeat 100% 0px, -moz-linear-gradient(top, #fff, #fff);
    background: url('../images/arrow.png') no-repeat 100% 0px, -ms-linear-gradient(top, #fff, #fff);
    background: url('../images/arrow.png') no-repeat 100% 0px, -o-linear-gradient(top, #fff, #fff);
    background: url('../images/arrow.png') no-repeat 100% 0px, linear-gradient(top, #fff, #fff);
    -webkit-appearance: none; /* gets rid of default appearance in Webkit browsers*/
    -moz-appearance: none; /* Get rid of default appearance for older Firefox browsers */
    -ms-appearance: none; /* get rid of default appearance for IE8, 9 and 10*/
    appearance: none;
}

#pie_register_reg_form  select option {
    background: #fff; /* style the dropdown bg color */
}


For more details visit this page .
http://hallofhavoc.com/2013/10/how-to-style-a-select-dropdown-using-only-css/

No comments:

Post a Comment

Pages