CSS :after content below a select element - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:after

Description

CSS :after content below a select element

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">
body {<!--  ww  w. j  a  v  a 2s  .  c  o  m-->
   background:Chartreuse;
   font-family:sans-serif;
}

.select {
   display:inline-block;
   background-color:yellow;
   border-radius:.6em;
   border:solid blue;
   color:pink;
   width:9em;
   height:2.6em;
   vertical-align:middle;
   position:relative;
}

.select:after {
   position:absolute;
   bottom:.16em;
   top:.16em;
   right:.6rem;
   content:'\2194';
   pointer-events:none;
}

select {
   -webkit-appearance:none;
   -moz-appearance:none;
   appearance:none;
   font:inherit;
   border:none;
   background-color:OrangeRed;
   color:grey;
   width:100%;
   height:100%;
   padding:0 .6em;
}
</style> 
 </head> 
 <body> 
  <span class="select"> <select> <option>L</option> <option>L</option> </select> </span>  
 </body>
</html>

Related Tutorials