Clearing the background of a <select> element's pull down button with CSS - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Button

Description

Clearing the background of a <select> element's pull down button with CSS

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

select {<!--  w  w w  . j  a va2 s  . c  om-->
   background: white;
   border: none;
   margin-left: 8px;
   position: relative;
   cursor: pointer;
   margin-top: -10px;
}
.select-container {
   display:inline-block;
   position:relative
}
.select-container:after {
   content:'';
   position:absolute;
   right:0;
   top:0;
   width:17px;
   height:100%;
   z-index:10;
   background-color:white;
}


      </style> 
 </head> 
 <body> 
  <div class="select-container"> 
   <select> <option>This is some option</option> 
   <option>This is some option</option> 
   <option>This is some option</option> 
   <option>This is some option</option> 
   <option>This is some option</option> <option>This is some option</option> </select> 
  </div>  
 </body>
</html>

Related Tutorials