I'm currently working on a dropdown menu that allows users to easily select their preferred language. I'm facing an issue with incorporating flags using https://github.com/lipis/flag-icon-css for each option. Can someone please assist me with this?
I have added the CSS and tested it on a simple element outside of the dropdown, where it displayed correctly. However, when I tried implementing it within the options, it didn't work. I also attempted using data-content but had no success.
<select class="form-control">
<option value="HU_hu" data-content='<span class="flag-icon flag-icon-hu"></span>'></option>
<option value="EN_en" data-content='<span class="flag-icon flag-icon-en"></span>'></option>
<option value="DE_de" data-content='<span class="flag-icon flag-icon-de"></span>'></option>
<option value="RU_ru" data-content='<span class="flag-icon flag-icon-ru"></span>'></option>
</select>