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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:16:50+00:00 2026-06-08T22:16:50+00:00

Say I have a basic website with a navbar that has a few links.

  • 0

Say I have a basic website with a navbar that has a few links. When I am on a page (say, Terms of Use), I want the “Terms of Use” link in the navbar to be highlighted. When I switch to a different page, I want that page’s link to be highlighted (i.e. I switch to privacy page, and then “Privacy” is highlighted in the navbar).

Does anyone know a simple way to do this with HTML/CSS/JS?

  • 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-08T22:16:51+00:00Added an answer on June 8, 2026 at 10:16 pm

    A simple way to do it without using javascript or php etc would be to add a different class to the body tag on each page.

    <body class="nav-1-on">
    

    Then in your css file:

    body.nav-1-on a.nav-1, body.nav-2-on a.nav-2  { color:red )
    

    SO you need XXX classes for however many nav items you have and you put a class on each nav item too as illustrated.

    Make sense?

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

Sidebar

Related Questions

Maybe a basic question but let us say I have a string that is
Let's say I have a text file of basic mathematical functions. I want to
Let's say I have a basic class A that aggregate B and C: class
I have a basic question. 1- I want to use Science.dll provided at http://www.sciencecode.com/
Say we have a basic list like this: <ul id=list> <li></li> <li></li> <li></li> </ul>
Lets say we have some basic AR model. class User < ActiveRecord::Base attr_accessible :firstname,
Say I have the following basic if-statement: if (A ~= 0) % do something
Say I have a couple of basic objects like so: [Serializable] public class Base
I have a basic PHP question, take the code below for example, let's say
Say I have a Telerik MVC Grid, AJAX bound and I want to put

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.