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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:39:04+00:00 2026-05-30T14:39:04+00:00

I have some trouble to find a css solution for having an active anchor

  • 0

I have some trouble to find a css solution for having an active anchor colored…

Why are the active anchors not red so that if clicked on “momo” momo keeps red? Or is active the wrong pseudoclass for that?

<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8" />
        <title>test</title>
    <style type="text/css">
        a:active{
        color:red;
        }
        a:hover{
        color:yellow;
        }
        </style>
    </head>

    <body>
    <ul> Navigation
    <li class="subli"><a href="#momo">momo</a></li>
    <li class="subli"><a href="#ipsi">ipsi</a></li>
    </ul>
    </body>

</html> 

Thanks
Juru

  • 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-05-30T14:39:05+00:00Added an answer on May 30, 2026 at 2:39 pm

    :active means “While being activated” e.g. when it is focused and the enter key is pressed or while it is hovered and the mouse button is being depressed. (Note that since you have have :hover after :active you’ll always override it for mouse activates)

    There is no pseudo-class for “Anchor with an href value that resolves to the current location”. For that you need to need to modify the HTML (preferably before it gets to the browser, but you can use JS as well).

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

Sidebar

Related Questions

I'm having some trouble with an SQL statement that have to find the number
I have been having some trouble finding a good way to output just the
I'm having some trouble with GSON, mainly deserializing from JSON. I have the following
Im having some trouble removing part of a cloned element: console.log($(this).closest('tr').clone().find('td:last')); //this is the
I am having some trouble wrapping my head around virtual proxies. I have read
I have some trouble with #define statements in my C++ code, however I'm not
I'm having some trouble to Convert UNICODE to HEX values.. I couldn't find proper
I'm having some trouble formulating a findAll query for BeautifulSoup that'll do what I
I'm having some trouble getting large background images I have for a site in
I have more of a .NET background, so I've been having some trouble coming

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.