HTML CSS examples for CSS Selector:disabled
Set a background color for all disabled <option> elements
<!DOCTYPE html> <html> <head> <style> option:disabled { background: red; } </style><!--from w ww . j av a 2s. c o m--> </head> <body> <select> <option value="css">CSS</option> <option value="saab" disabled>Saab</option> <option value="java">Java</option> <option value="audi" disabled>Audi</option> <option value="bmw">BMW</option> </select> </body> </html>