Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change Bootstrap 3's glyphicons to white? [duplicate]

I've got the glyphicons in my page, but they are black. How do I set the glyphicons to white?

like image 720
user2654833 Avatar asked Aug 06 '13 01:08

user2654833


People also ask

How do I add Glyphicons in Bootstrap 3?

Bootstrap 3 Glyphicons are actually fonts, so you can scale them and color them as you please. Bootstrap previously used image sprites for icons. To add a glyphicon, add a <span> tag with Bootstrap's . glyphicon class and also the class for the specific glyphicon that you require.

How do you add color to Glyphicon?

Approach: First, we need to assign the id attribute to the particular glyphicon which you need to customize by using CSS. We can apply the color property to the particular id and change the icon color by using a hex value or normal color. The id is an attribute that is used to access the whole tag.

How do I change Glyphicons?

If you need to change the size of glyphicons, use the CSS font-size property. In this snippet, we'll show some examples and explain them. Let's start with an example, where we increase all the glyphicons and set their font-size to 50px.


1 Answers

You can just create your own .white class and add it to the glyphicon element.

.white, .white a {   color: #fff; } 
<i class="glyphicon glyphicon-home white"></i> 
like image 176
dodgerogers747 Avatar answered Sep 20 '22 03:09

dodgerogers747