Smitha
Smitha

Reputation: 6134

Glyphicons don't work when I run bower install on bootstrap 3.2.0

I have the following in my fonts folder:

(Path:C:\Users\smitha\Code\proj\bower_components\bootstrap\dist\fonts)

But glyphicons like glyphicon-search are not loading!

 <div tabindex="6" class="glyphicon glyphicon-search">...<.div>

Upvotes: 3

Views: 2880

Answers (1)

Sean Mickey
Sean Mickey

Reputation: 7716

First, you don't appear to have the full set of font files. A complete set should include the following 5 files:

  1. glyphicons-halflings-regular.eot
  2. glyphicons-halflings-regular.svg
  3. glyphicons-halflings-regular.ttf
  4. glyphicons-halflings-regular.woff
  5. glyphicons-halflings-regular.woff2

Second, unless you take steps to specifically identify the location of the font files, the standard location is assumed to be a /fonts folder that is a sibling to the directory that contains your bootstrap.js. For example, using the location of the /fonts directory in your posting:

C:\Users\smitha\Code\proj\bower_components\bootstrap\dist\fonts

Your Bootstrap JavaScript library should be located at:

C:\Users\smitha\Code\proj\bower_components\bootstrap\dist\js\bootstrap-3.2.0.min.js

It doesn't matter whether that folder is actually named /js; it could be named anything; the important part is that it is a sibling to the /font folder. You don't mention the location of your Bootstrap library, but my guess is that it isn't in a directory that is a sibling to your /font directory.

If this doesn't help you to resolve the problem, you may want to include more information about your full project directory structure, especially the location of the Bootstrap JavaScript library.

Upvotes: 1

Related Questions