Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:31:53+00:00 2026-06-15T17:31:53+00:00

bootstrap states that There are also styles available for inverted (white) icons, made ready

  • 0

bootstrap states that

There are also styles available for inverted (white) icons, made ready
with one extra class. We will specifically enforce this class on hover
and active states for nav and dropdown links.

this doesn’t seems to be working on my navbar (parts omitted for sake of simplicity).
This is the div chain.

<div class="navbar navbar-inverse navbar-fixed-top ">
    <div class="navbar-inner ">
        <div class="container">
         <div class="nav-collapse collapse ">
           <ul class="nav" >
            <li><%= link_to content_tag(:i," ", :class=>"icon-envelope")+ " " +"Messages, messages_path %> </li>

the css code from bootstrap is

.icon-white,
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"],
.dropdown-submenu:hover > a > [class^="icon-"],
.dropdown-submenu:hover > a > [class*=" icon-"] {
  background-image: url(/assets/twitter/bootstrap/glyphicons-halflings-white.png);
}

The switch does happen with this css code

.navbar-inverse .nav  a:hover [class^="icon-"],
.navbar-inverse .nav a:hover  [class*=" icon-"]{
        background-image: url(<%= asset_path "/assets/twitter/bootstrap/glyphicons-halflings-white.png" %>);

}

should I add anything or did I miss anything? Why does my css works but bootstrap’s code doesn’t?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:31:54+00:00Added an answer on June 15, 2026 at 5:31 pm

    If you only have to add one class to your image with bootstrap, I’d suggest you to use jQuery to add the class on hover and remove to class on mouseOut. How? Here’s a good way :

        $("yourSelector").hover(
           function () {
             $(this).toggleClass('datWhiteClass');
           }, 
          function () {
              $(this).toggleClass('datWhiteClass');
           }
         );
    

    In this case, the first function is what happen on the mouseover and the second when the hover state is not true anymore!
    Hope it helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

bootstrap popover currrently expects this: <a href=# id=example class=btn btn-danger rel=popover data-content=It's so simple
Twitter Bootstrap has a form control that would glow on the borders when in
I'm using Bootstrap on a web app that has some pages that contain iframes.
I am using the Bootstrap CSS framework that has this: .dropdown-menu { left: 0;
I've just noticed that my app is including over 148 php files on one
I'm trying to load an assembly, instantiate a class from that assembly, and then
I have 2 classes and an Enum. One class is a wrapper for the
Twitter Bootstrap icons are pretty deadly seen here . Look at the bottom right
Bootstrap has many pre-defined styles for progress bar, but how to make them some
In Bootstrap, How to make a link (button) which toggles a region. My intention

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.