Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- select:required:invalid {
- color: gray;
- }
- option[value=""][disabled] {
- display: none;
- }
- option {
- color: black;
- }
- </style>
- <select required>
- <option value="" disabled selected>Select something...</option>
- <option value="1">One</option>
- <option value="2">Two</option>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement