Change font-color for disabled input for select option - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Font

Description

Change font-color for disabled input for 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 option.disabled {
   background-color:Chartreuse;
}

select option.disabled:disabled {
   color:yellow;
   background-color:blue;
   font-weight:bold;
}

select option:hover {
   color:pink;
   background-color:OrangeRed;
}

select option.disabled:hover {
   color:grey;
}
</style> <!--from  w w  w  . j ava2s .co m-->
 </head> 
 <body> 
  <select size="3" multiple> <option class="disabled" disabled>Lorem i</option> <option>Lorem</option> <option>Lorem</option> <option>Lorem</option> <option class="disabled" disabled>Lorem i</option> <option>Lorem</option> <option>Lorem</option> <option>Lorem</option> <option class="disabled" disabled>Lorem i</option> <option>Lorem</option> <option>Lorem</option> <option>Lorem</option> </select>  
 </body>
</html>

Related Tutorials