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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:21:55+00:00 2026-06-08T21:21:55+00:00

I have inherited a very large CSS file, and I added a specific id

  • 0

I have inherited a very large CSS file, and I added a specific id as follows:

#specialLink a, #specialLink a:link, #specialLink a:active, #specialLink a:visited
{
    border:solid 1px #000000; 
    background-color:#CC0000;
}

However, when I use it in a link, as in <a id="specialLink" href="whatever.htm">Test Link</a>, it completely ignores the border attribute above, but respects the background-color attribute.

I was led to believe that an id tag in CSS has ultimate priority, so what could be causing the border attribute to be completely ignored?

  • 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-08T21:21:57+00:00Added an answer on June 8, 2026 at 9:21 pm

    Your selector is incorrect. You have:

    #specialLink a {}
    

    This will match anchor elements that are descendents of an element with the ID #specialLink:

    <div id="specialLink">
        <a href="#">Anchor</a>
    </div>
    

    What you want is:

    a#specialLink {}
    

    So that the selector will match:

    <a href="#" id="specialLink">Anchor</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Platform: Flex 3 & Flex 4 Language: AS3 I have inherited a very large
I have a very large .csv file, and I'm loading it into mysql with
I have this Javascript code I inherited from another developer. I am very new
I have inherited a large admin winforms application that shares a 'Common' library of
I've got a rather hideous and large javascript file that I've inherited from a
I have 3 very large tables with clustered indexes on composite keys. No updates
I'm writing a book. I have a large notes file, with hyperlinks of interest.
I inherited a very large subsystem from a programmer that left the company and
I have a conundrum. I have inherited a very badly designed and very complex
We've inherited a rather large Access DB that has some very strange (and unsettling)

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.