Issue
I want to add a floating placeholder for the select tag. But the select tag is choosing the fist option by default. I don't want to put an extra option without the value in the list.
Solution
Use this code:
<select name="tagging">
<option selected="true" style='display: none'></option>
<option value="Option A" >Option A</option>
<option value="Option B" >Option B</option>
<option value="Option C">Option C</option>
</select>
EDIT: Now the first option is selected but not visible.
Answered By - Alon Eyal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.