HTML CSS examples for HTML Tag:select
Style select box option:disabled when it's checked
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .select-box {<!--from w w w .ja v a 2 s. c om--> border:2px solid Chartreuse; height:37px; background:transparent; margin:11px 0 15px 0; color:yellow; } option.base { color:blue; } option:not(:checked) { color:pink; } option:not(:checked).base { color:OrangeRed; } </style> </head> <body> <select class="select-box"> <option selected class="base" value="0">Lorem ipsu</option> <option value="01">Lorem ipsum </option> <option value="02">Lorem ipsum d</option> <option value="03">Lorem ipsu</option> <option value="04">Lorem ipsu</option> <option value="05">Lorem ip</option> <option value="06">Lorem ips</option> <option value="07">Lorem ips</option> <option value="08">Lorem ipsum</option> <option value="09">Lorem ipsum do</option> <option value="10">Lorem ipsum </option> <option value="11">Lorem ipsum d</option> <option value="12">Lorem ipsum d</option> </select> </body> </html>