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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:35:16+00:00 2026-06-12T00:35:16+00:00

Kind of hard to explain, so here’s some code. So I have this CSS,

  • 0

Kind of hard to explain, so here’s some code.

So I have this CSS, which makes all links an orangish color. It encompases the entire page.

#pageContent a:link,a:visited, a:hover, a:active {
    color: #EE4036; 
}

And then I have an element of id sideMenu somewhere within the pageContent id,

#sideMenu a:link, a:visited, a:hover, a:active{
    color:#58595B;

}

The problem is that for some reason sideMenu’s given link color is overwriting pageContent’s link color for links that aren’t children of sideMenu.

for example, if I had

<div id="pageContent" >
   <a>this text should be #EE4036</a>
   <div id="sideMenu">
      <a>this text should be #58595B</a>
   </div>
</div>

sideMenu’s <a> text content would get set to the color #58595B as expected, but so would pageContent’s, which is what I wouldn’t expect.

I’m a bit new to CSS so I feel like I’m missing some super obvious rule and google isn’t helping at all. So, anyone know what’s going on?

  • 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-12T00:35:17+00:00Added an answer on June 12, 2026 at 12:35 am

    You would need to prefix each selector with the ID:

    #sideMenu a:link, #sideMenu a:visited, #sideMenu a:hover, #sideMenu a:active {
        color:#58595B;
    }
    

    Currently, your selector says match “links that are descendants of an element with ID “slideMenu”, links that have been visited, links that are being hovered, and active links”.

    Basically, when you use the comma to create a group of selectors, each individual selector is completely independent. There is no relationship between them.

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

Sidebar

Related Questions

This is kind of hard to explain. I have an absolutely positioned floating secondary
it's pretty simple but is kind of hard to explain. I have this image
This is kind of hard to explain. Here's an example of my HTML: <div
So this is kind of hard to explain in text, I have attached an
This is kind of hard to explain so I'll break it down...Here's the objective
This is kind of hard to explain, but here is my problem: When, at
I have a requirement which sounds like kind of simple but hard to implement
This is kind of hard to explain, so bear with me. In PHP, if
This is kind of hard to explain, so I'll do my best: I want
This is kind of hard to explain but I'll do what I can. I

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.