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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:08:40+00:00 2026-05-22T00:08:40+00:00

My intent is to style all anchor tags within a table in a particular

  • 0

My intent is to style all anchor tags within a table in a particular way.

The anchor tags may be contained within various containers inside the table, including:

  • table cells
  • divs
  • paragraphs

My initial attempt:

.FooterTable a:link, a:visited, a:hover, a:active
{
    color: blue;   
}

This is occurring within a CMS (DotNetNuke), so pretty much everything has a style specified in a CSS class somewhere. However, I believe my CSS Class above should take effect.

Here’s my markup:

<table width="100%" cellpadding="0" cellspacing="0" border="0" class="FooterTable">
    <tr>
        <td width="23%" align="center">
            <a href="http://www.test.com/pages/45_contact_us.cfm">Our Company</a>
        </td>
        <td width="19%" align="center">
            <a href="http://www.test.com/pages/6_test_test_test_test.cfm">Need Help?</a>
        </td>
        <td width="37%" align="center">
            <a href="http://www.test.com/pages/187_test_test.cfm">Shop</a>
        </td>
        <td width="21%" align="center">
            <a href="http://www.test.com/pages/42_test_test.cfm">Partners</a>
        </td>
    </tr>
</table>

Current Behavior

All text on the site is specified to be some sort of gray. That gray color is simply not being overridden with the above CSS Class.

What is the correct way to set the style of all links within a table, such as this?

  • 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-22T00:08:41+00:00Added an answer on May 22, 2026 at 12:08 am

    You have the correct idea, though you do need to make sure that .FooterTable precedes each a, as each comma separates full selectors.

    Ideally, you could go with the simple:

    .FooterTable a, .FooterTable a:hover {
        color: blue;   
    }
    

    But, you seem to be running into a CSS selector specificity/precedence problem. Read that answer for more details, but basically, existing CSS rules being applied may “more specific” and therefore take precedence over your fairly simply .FooterTable a:link rule.

    To verify this, I isolated just the HTML/CSS from this question into a sample page, and the blue color in the CSS rule in fact does apply to the links.

    To fix this problem, you have two options:

    1. Ideally, global CSS rules should not be overly specific. If you can fix them to be less specific, you will be better all around.
    2. If you can only add CSS rules, not take away from those already applied elsewhere, you will need to be more specific. See my answer and other answers on StackOverflow for details on how selector precedence works.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to apply a style to all elements of a specific
I'm trying to setup a CSS style to highlight a table cell in a
I want to apply the following style to all controls that derive from ButtonBase
The intent here is to deal with obfuscated passwords for resources. We have an
My intent is to proxy Roo Maven repository with my local Nexus installation, so
My intent is to create a dictionary containing whose keys are primitives and whose
I am creating an intent to play videos stored in the sdcard. It happens
I have a intent receiver in my android manifest, but would like to give
Does Android broadcast an intent when the network state has changend, i.e. from GSM
Here is my intent-filter code... <activity android:name=IntentReceiver> <intent-filter> <action android:name=android.nfc.action.TAG_DISCOVERED/> <category android:name=android.intent.category.DEFAULT /> <data

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.