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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:34:51+00:00 2026-06-17T09:34:51+00:00

I am trying to get my navigation bar to have a current page indicator

  • 0

I am trying to get my navigation bar to have a current page indicator and I have researched every article possible, as well as, followed exact examples, but it still will not work.

I am using a sprite image of only two images. The image is width of 480, height 40 with each image at width 240, height 40. One side is blue and the other side is yellow.

I want to have the off-state to be the blue side, and then have the hover, active and current state be the yellow side. However, I dont care to have an active state at the moment.

So, my question is: my off state(blue side), hover state(yellow side) work perfect. I just need my current state(yellow side) to work. So, when you click on the menu item the image stays yellow.

I apologize for any horrible coding, as this is my first attempt

This is a portion of what I have for my html: (I will use just one of the three menu items, profile.)

<body bgcolor="CEB86C"; class="profile">

    <div id="navigation">
        <ul>
            <li><a class= "news" href="news.html" title"news"></a></li> 
            <li><a class="profile " href="index.html" title"profile"></a><li>
            <li><a class= "about" href="about.html" title"about"></a><li>
        </ul>
    </div>

Here is the CSS:

#navigation ul {
    list-style: none;
    text-align: center;
}
#navigation li {
    display: inline;
}
#navigation li a {
    text-indent: -5000px;
    display: inline-block;
    height: 40px;
}
#navigation li a.profile {
    width: 240px;
    background: url(images/profile.jpg);
    text-decoration: none;
}
#navigation li a.profile:hover {
    background: url(images/profile.jpg);
    background-position: -240px;
    text-decoration: none;
}
#navigation li a.profile:current {
    background: url(images/profile.jpg);
    background-position: -240px;
    background-repeat: no-repeat;
    text-decoration: none;
}

I appreciate any input and thank you 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-17T09:34:52+00:00Added an answer on June 17, 2026 at 9:34 am

    Assuming that you change the class on the body depending on which page you are on then you can just modify the last css declaration to read:

    .news #navigation li a.news,
    .profile #navigation li a.profile,
    .about #navigation li a.about {
        background:url(images/profile.jpg);
        background-position: -240px; 
        background-repeat: no-repeat;
        text-decoration:none;
    }
    

    Edit – if you have 3 separate images then you could do something like:

    .news #navigation li a.news {
        background:url(images/news.jpg);
        background-position: -240px; 
        background-repeat: no-repeat;
        text-decoration:none;
    }
    
    .profile #navigation li a.profile {
        background:url(images/profile.jpg);
        background-position: -240px; 
        background-repeat: no-repeat;
        text-decoration:none;
    }
    
    .about #navigation li a.about {
        background:url(images/about.jpg);
        background-position: -240px; 
        background-repeat: no-repeat;
        text-decoration:none;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make my own navigation bar to get a better understanding
I'm trying to get a navigation bar that consists of a nav with an
Starting point: End point: I'm trying to have a horizontal navigation bar that fills
I have a webpage with the navigation bar at the bottom of the page
I'm trying to set up a page so that the navigation bar has a
I'm trying to build a very simple pure css navigation bar, but have hit
I am trying to load my navigation bar like this: $.get(nav.html,function(menuData){ $(body).html(menuData); )}; and
So I'm trying to get a navigation layout for a header like the one
I'm having terrible trouble trying to get a navigation controller up-and-running. Basically, I want
I have a view controller that i'm trying to push onto the navigation stack.

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.