I want a select box with the font awesome icon and the name of the icon. I build my ListItems for the DropDownList in Code behind dynamically and want to show the icon with the unicode. Here is my output:
The decleration of the DropDownList looks like this:
<asp:DropDownList ID="ddl_Icons" CssClass="form-control select2 fontawesomeselect" runat="server"></asp:DropDownList>
The font-family should be correct but there is still no icon displayed. Any tips how I can display the icons?
I'm using select2 and have made two CSS classes containing the following code:
<style type="text/css">
.fontawesomeselect {
font-family: 'FontAwesome', 'Arial';
}
.select2-selection__rendered{
font-family: 'FontAwesome', 'Arial';
}
</style>
I did a workaround with the awesome Bootstrap Iconpicker plugin. Simply add an button (with popover from the right side) to your page:
Import the following files:
Header:
Footer:
In my case I'm using the font awesome iconset (v4.2) but you can also use one of the following iconsets:
Maybe this helps somebody with a similar problem.