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 7839869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:34:37+00:00 2026-06-02T15:34:37+00:00

Using twitter bootstrap. on the site i have a top nav bar consisting of

  • 0

Using twitter bootstrap. on the site i have a top nav bar consisting of links where some have dd-menus, and some are just static links.

i’m constructing the links using img’s instead of text anchors.

i would like to get a hover effect applied to each of the links in the nav bar. this to be done by swapping out the image or loading a different background location in the sprite.

i’m using the regular way of specifying the nav bar,

  <ul class="nav nav-pills">
         <li class="dropdown" id="hifiMenu">
               <a class="dropdown-toggle" data-toggle="dropdown" href="#hifiMenu"><img src="$PRE/images/newhifi.png"></a>
         <ul class="dropdown-menu">
               <li class="mainitem"><a href="$PRE/newhifi">BY BRAND</a></li>

is it possible to put a hover on the A link for #hifiMenu, and when the dropdown is activated, have the image swapped out?

not quite sure what the best practice would be using TB’s nav bar control. has anyone tried something like this?

thanks in advance.

  • 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-02T15:34:41+00:00Added an answer on June 2, 2026 at 3:34 pm

    as mentioned in my question, i have the following nav bar items:

    <ul class="nav nav-pills">
         <li class="dropdown" id="hifiMenu">
               <a class="dropdown-toggle" data-toggle="dropdown" href="#hifiMenu"><img src="newhifi.png"></a>
         <ul class="dropdown-menu">
               <li class="mainitem"><a href="newhifi">BY BRAND</a></li>
    ....
    

    in order to get the hover to work, i first created a large sprite image that contained every normal/highlighted image.

    then i set up a new style for each of my links:

    #hifiMenuLink {
        width:71px;
        height: 11px;
        background-image: url(path_to_sprite);
        background-repeat: no-repeat;
        background-position: 0px -6px;
    }
    

    then for the hover:

    #hifiMenuLink:hover {
        width:71px;
        height: 11px;
        background-image: url(path_to_sprite);
        background-repeat: no-repeat;
        background-position: 0px -37px;
    }
    

    then i assigned the ID, hifiMenuLink, to the anchor itself…

    <a id="hifiMenuLink" ...
    

    that was my quick and dirty solution.

    hope this can help out someone else in the future.

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

Sidebar

Related Questions

I am using twitter bootstrap but have a problem with the nav bar height
I have just integrated my design built using twitter bootstrap, html5, css, jquery with
We are using twitter bootstrap to do some redesign of our site. The issue
I just started using Twitter Bootstrap, and I have a question about how to
I'm creating a site using the Twitter Bootstrap , but I've discovered that the
I am using Twitter Bootstrap on two project, one is a static HTML website
I'm not currently using twitter bootstrap, but I do like some of the components.
Firstly I design the site & convert it into HTML using Twitter bootstrap. The
I'm using twitter bootstrap . I have a div with 25 px padding. I
I'm using twitter bootstrap for some web app I'm forced to do (I'm not

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.