Reputation: 37
I have struggling to set a font-awesome icon in the select drop-down menu in vuejs. I have tried some ways like
<option selected value="fa fa-github"><i class="fab fa-github">
</i>Github</option>
But it didn't work. please help me to solve this issue.
Upvotes: 2
Views: 9075
Reputation: 1116
You can't put an <i>
tag inside an <select>
you can use the unicode directly inside the select and set the font with css.
HTML:
<select>
<option selected value="fa fa-github">Github </option>
</select>
CSS:
select {
font-family: 'Font Awesome\ 5 Brands' , 'arial'
}
Example on this jsfiddle(font awesome 5): https://jsfiddle.net/68avuypL/
Upvotes: 4