Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glyphicons from bootstrap doesn't show up

<div class="container-fluid">
  <div class="sidebar left">
    <div id="app-navigation" class="well">
      <h5>Administration</h5>
      <ul class="administration-list">
        <li class="user"><a href="#user">User</a></li>
        <li class="emails"><a href="#emails">Emails</a></li>
        <li class="settings"><a href="#Settings">Settings</a></li>
        <li class="logs"><a href="#Logs">Logs</a></li>
        <li class="help"><a href="#Help">Help</a></li>
      </ul>
      <h5>Managing tools</h5>
      <ul class="tools-list">
        <li class="ressource"><a href="#Ressources"><i class="icon-home icon-white" </i>Ressources</a></li>
        <li class="playlist"><a href="#Playlist">Playlist</a></li>
        <li class="schedule"><a href="#Schedule">Schedule</a></li>
        <li class="stations"><a href="#Stations">Stations</a></li>
      </ul>
    </div>
  </div>
</div>

I don't understand why my icon doesn't show up. I'm starting a new project and decided to try out initializr with bootstrap. Just can't make those icon appear. It's seems there's an invisible icon just before my text... I have check the documentation too, here. I also checked within my boostrap.less, sprites.less and variables.less (everything seems okay...).

My variable are correctly set and my image (PNG) are in my ../img folder.

// Sprite icons path
// -------------------------
@iconSpritePath:          "../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";
like image 996
fneron Avatar asked Jul 12 '12 21:07

fneron


2 Answers

The file variables.less is at the bootstrap folder, so you need one more level to get to root.

Try to set the path to:

@iconSpritePath:          "../../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../../img/glyphicons-halflings-white.png";
like image 137
Bruno Campos Avatar answered Oct 24 '22 22:10

Bruno Campos


In the newest Bootstrap icons are included with the new class glyphicon:

<i class="glyphicon glyphicon-heart"></i>

In some cases that will probably be the problem.

like image 25
Duther Avatar answered Oct 24 '22 23:10

Duther