Change the font-size of a select option - HTML CSS CSS Property

HTML CSS examples for CSS Property:font-size

Description

Change the font-size of a select option

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_join {<!--from   w  w w . j  ava  2s  .c o  m-->
   width:171px;
   height:29px;
   overflow:hidden;
   background:url('https://www.java3s.com/style/demo/Google-Chrome.png') no-repeat right blue;
   border:2px solid Chartreuse;
   -webkit-border-radius:4px;
   border-radius:4px;
   -webkit-box-shadow:inset 0px 0px 11px 2px blue;
   box-shadow:inset 0px 0px 11px 2px blue;
}

.select_join select {
   background:transparent;
   width:171px;
   font-size:8pt;
   color:yellow;
   border:0;
   border-radius:0;
   height:29px;
   -webkit-appearance:none;
}

.select_join select:focus {
   outline:none;
}

.select_join option {
   font-size:14px;
}
</style> 
 </head> 
 <body> 
  <div style="background-color:pink;height:150px; text-align:center;"> 
   <br> 
   <div class="select_join" style="margin-left:15px"> 
    <select name="txtCountry"> <option>Lorem ipsum dolor si</option> <option value="1">Lorem ip</option> <option value="2">Lorem ipsum</option> </select> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials