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

  • Home
  • SEARCH
  • 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 7765129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:05:42+00:00 2026-06-01T15:05:42+00:00

Here are the tabs in the master page: <nav> <ul id=menu> <li><%: Html.ActionLink(Home, Index,

  • 0

Here are the tabs in the master page:

<nav>
     <ul id="menu">
         <li><%: Html.ActionLink("Home", "Index", "Home")%></li>
         <li><%: Html.ActionLink("About", "About", "Home")%></li>
     </ul>
</nav>

And here is the css:

ul#menu li.selected a {
    background-color: #a6e2a6;
    color: #000;
}

But no matter what I do to background-color, it always remains the same. How to change the background color and the height of the selected tab?

  • 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-01T15:05:43+00:00Added an answer on June 1, 2026 at 3:05 pm

    The :active selector doesn’t style the link that corresponds with the current page, but it styles the link on which is the user is currently clicking.

    The :active selector is really similar to the :hover selector, which styles the link when the user is hovering over it. They are both selectors which are responding to mouse actions.

    Here is a sample which shows the behavior rather obvious: http://jsfiddle.net/NuExP/

    Edit after you modified the question:

    Like @o.v. said, there is no selector for the current active page, so his solution to add a class to the link to indicate that it is the current active page is correct.

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

Sidebar

Related Questions

here is the project page: http://blog.papermusepress.com/s7/tabs/ it's all html so feel free to view
I have this simple js tabs. Here is the html : <div class=product-collateral> <div
I am using a JQuery UI Tabs (1.8.6). Here is my HTML <div id='outer1'
Here's one of the tabs I have that loads a page. package realstrat.cfostudio.magazineapp; import
Here's what i've done so far: <html> <head> <style> /* Tabs */ #navlist {
Here's the code in AlertTableView: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ NSInteger index = 12345; NSLog(@AlertTableView:
I use jqueryui-tabs to display a tabbed UI. here is how my markup looks
I'm completely new to HTML, CSS and Javascript but drawing on previous knowledge of
Here's the setup: I have a tab bar controller with two tabs. There is
Here's my problem: I've have an application with tabs. in each tab I have

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.