When designing a website, select boxes are one of the most worst problem to style them with our imagination.
In this tutorial we learn how to style select box using only CSS and style it witch we want.
<select>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
<option>Option 5</option>
</select>
.styling select::-ms-expand {
display: none;
}
.styling select{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 2px solid #1038ef;
border-radius: 35px;
color: #333;
font-size: 16px;
height: 35px;
padding-left: 10px;
width: 200px;
background-image: url(arrow.jpg);
background-position: right;
background-repeat: no-repeat;
}
In this tutorial we just remove arrow of the select box and add image of arrow in background.
This below CSS code is used to remove arrow from Internet Explorer browser
.styling select::-ms-expand {
display: none;
}
This below CSS code is used to remove arrow from Chrome and Safari browser
select{
-webkit-appearance: none;
}
This below CSS code is used to remove arrow from Firefox browser
select{
-moz-appearance: none;
}
This below CSS code is default code to remove the arrow
select{
appearance: none;
}
Demo here: Demo
Download from: Download
Studio Ghibli is famous for its beautiful, hand-painted animation style with soft colors, dreamy landscapes,…
When creating a website, choosing the right Content Management System (CMS) is crucial. There are…
If you’re building a WordPress website, you’ll need plugins to add important features like contact…
Selecting a best WordPress theme may be a small detail, but it has a big…
WordPress is one of the most popular content management systems (CMS) in the world, but…
WordPress speed optimization is one of the most important factors in user experience and SEO.…