"custom select box"
Bootstrap 3.3.0 Snippet by quaisar

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <select class="form-control"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select>
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!important; /* 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; background: url('../images/arrow.png') no-repeat 100% 0px; background: url('../images/arrow.png') no-repeat 100% 0px; background: url('../images/arrow.png') no-repeat 100% 0px; background: url('../images/arrow.png') no-repeat 100% 0px; -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; } select{ background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */ Current gradient has opacity, switching color format to 'rgba' Color format: Comments IE9 Support (?) border: none; border: 1px solid #ccc; -webkit-box-shadow: 1px 1px 5px #ccc; -moz-box-shadow: 1px 1px 5px #ccc; box-shadow: 1px 1px 5px #ccc; height: 35px; background-color: #eee; } select option { background: #fff; /* style the dropdown bg color */ }

Related: See More


Questions / Comments: