Jedi Ablaza Jedi Ablaza - 3 months ago 22
ASP.NET (C#) Question

glyphicon is not working

my glyphicons are not working in my "dropdown" class. but it works in my "dropdown-menu" class. my first tag, the text is loaded through database, but the glyphicon is not showing up. what can I do?

<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a id ="lblnames" class="dropdown-toggle" data-toggle="dropdown" runat="server" style="color:white; cursor:pointer"># <span class="glyphicon glyphicon-user"></span></a>

<ul class ="dropdown-menu">
<li><a href="Account/Manage.aspx" style="font-family:Calibri">Manage Account <span class="glyphicon glyphicon-cog pull-right"></span></a></li>

<li><a id="endsession1" href="Account/forLogOut.aspx" style="font-family:Calibri">Log Out <span class="glyphicon glyphicon-log-out pull-right"></span></a></li>
</ul>
</li>

</ul>

Answer

I tried your code and it seems fine. The problem is that you have set the color to white in your inline CSS here:

<a id ="lblnames" class="dropdown-toggle" data-toggle="dropdown" runat="server" style="color:white; cursor:pointer"># <span class="glyphicon glyphicon-user"></span></a>

I changed the color to something else and it worked fine. :)

Comments