[GH-ISSUE #653] How to use these icon in select option.. #353

Closed
opened 2026-03-03 14:37:46 +03:00 by kerem · 1 comment
Owner

Originally created by @mzainzulifqar on GitHub (Dec 14, 2019).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/653

<select name="country"  class="form-control" required="required">
      <option>
           <span class="flag-icon flag-icon-gr">GR</span>
      </option>
</select>
Originally created by @mzainzulifqar on GitHub (Dec 14, 2019). Original GitHub issue: https://github.com/lipis/flag-icons/issues/653 ``` <select name="country" class="form-control" required="required"> <option> <span class="flag-icon flag-icon-gr">GR</span> </option> </select> ```
kerem closed this issue 2026-03-03 14:37:46 +03:00
Author
Owner

@tomlutzenberger commented on GitHub (Dec 17, 2019):

You can't. Option tags only accept plain text as content.
Only way to accomplish a similar result is to set the flag image as background of <option> and indent its content.

<!-- gh-comment-id:566455709 --> @tomlutzenberger commented on GitHub (Dec 17, 2019): You can't. Option tags only accept plain text as content. Only way to accomplish a similar result is to set the flag image as background of `<option>` and indent its content.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#353
No description provided.