Custom select box with simple css

I have given the simple example below for write custom css for select box

custom_select_box_with_css

HTML

<div class="select-style">
<select>
<option value="CakePHP">CakePHP</option>
<option value="Symfony">Symfony</option>
<option value="Yii">Yii</option>
<option value="Zend">Zend</option>
</select>
</div>

CSS

.select-style {
    border: 1px solid #ddd;
    width: 240px;
    border-radius: 3px;
    overflow: hidden;
    background: #fafafa url("img/dropdown-btn-arrow.png") no-repeat 90% 50%;
}

.select-style select {
    padding: 5px 8px;
    width: 268px;
    border: none;
    box-shadow: none;
    background: transparent;
    background-image: none;
    -webkit-appearance: none;
}
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin
Share On Pinterest

Be the first to comment

Leave a Reply

Your email address will not be published.

*


*