Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glyphicons rendering as empty box

I'm using the excellent Twitter bootstrap library with Glyphicons, however all the icons are rendering as empty squares, like so:

enter image description here

I've uploaded the Glyphicons fonts to my web root and changed the bootstrap.css file to point to their correct locations, which I've verified because they have 200 OK requests in Chrome's dev tools:

enter image description here

This is the markup I'm using:

<a href="http://www.mysite.com/download" class="btn btn-primary"><span class="glyphicon glyphicon-star"></span> Download to Computer</a>

Any ideas why the font may be rendering as empty boxes? Previous answers on StackOverflow all point to incorrect paths to the fonts, which isn't the case here as the paths are correct.

like image 821
John Dorean Avatar asked Sep 07 '13 22:09

John Dorean


People also ask

What can I use instead of Glyphicons?

Free Alternatives to Glyphicons You can use both Font Awesome and Github Octicons as a free alternative for Glyphicons.

What is the main usage of Glyphicons?

The Glyphicons are a set of symbols and icons to understand more effectively and easily in web projects. The Glyphicons are used for some texts, forms, buttons, navigation, and etc. The bootstrap has many Glphyicons but there has a standard format to display icons.

Can I use Glyphicons in bootstrap 4?

Bootstrap 4 does not have its own icon library (Glyphicons from Bootstrap 3 are not supported in BS4). However, there are many free icon libraries to choose from, such as Font Awesome and Google Material Design Icons.

Which HTML tag is used to display Glyphicons?

Bootstrap Glyphicons provides a number of icons. Choose one of them and add the name of the icon class to any HTML element within the < body > tag.

What are Glyphicons in Bootstrap?

Glyphicons are basically little symbols, icons, or pictograms (whatever you prefer to call them) that you can use in a webpage. They're implemented in Bootstrap as an icon font — a custom font that contains these glyphs instead of letters. If you're creating a site based on Bootstrap 3.3.7,...

How do you use glyphicon in HTML?

<span class="glyphicon glyphicon-home"></span> = The first class—glyphicon—is a base class. It tells the <span> tag, "hey, heads up: this is going to be an icon.". The second class (in this example, glyphicon-home) points the specific icon you want to use. This one is an icon of a house!

How do I use a glyphicon cheat sheet?

To use this cheat sheet, simply find the glyphicon you want to use and click the copy button. This will add the complete HTML code for that glyphicon (span tag and all) to your clipboard, ready to paste into your web development tool of choice.

Where did the Glyphicons come from?

The glyphicons you see in Bootstrap are part of a set called Glyphicons Halflings and were created by the very talented Jan Kovařík over at GLYPHICONS.


1 Answers

Not really a solution, but I ended up just using the Bootstrap CDN: http://www.bootstrapcdn.com/

like image 178
John Dorean Avatar answered Oct 17 '22 14:10

John Dorean