Make a placeholder for select box
Posted: 12 Jan 2015, 08:35
I'm using placeholders for input fields which is working out just fine. But I'd like to use a placeholder for select options list as well.
Of course I can just use this code:
But the "Select your option" can be selected, and is in black instead of lightgrey.
So, is there any HTML-CSS based solution to make a placeholder for select box.
Of course I can just use this code:
Code: Select all
<select name="sname">
<option value="">Select your option</option>
<option value="op1">Option 1</option>
<option value="op2">Option 2</option>
</select>
So, is there any HTML-CSS based solution to make a placeholder for select box.