CSS override

Posted on 2007-09-28
Last Modified: 2010-05-04
Is there a way to override an existing css declaration?

I do not have access to the html page.  I only have access to the css page.  Currently, I would like to override the existing css declaration:
.category .content table tbody td {
      font-weight: bold;
.category .content table tbody td a:visited{
      font-weight: normal;

Unfortunately, what I've attempted to do fail.  I would greatly appreciate any suggestion to accomplish my task.
Question by:paulinewin
    LVL 3

    Accepted Solution

    Make sure this declaration is after the first one in your css style sheet.  It should overwrite the previous one.

    Don't forget to make it for all the states of the link

    JUST AN EXAMPLE change code as you like
    .category .content table tbody td a,
    .category .content table tbody td  a:link,
    .category .content table tbody td  a:visited,
     .category .content table tbody td a:active {
            font-weight: normal;
     .category .content table tbody td a:hover {
            font-weight: normal;

    If that fails, look at the HTML and see if there is any way to be even more specific...(google "specificivity" and CSS) for example is there an ID tag anywhere on the page you can use?
    LVL 29

    Expert Comment

    <$.02>"specificivity"? Are you kidding me?? "specificivity"??? Man, is *that* hard to pronounce ;-)</$.02>
    LVL 6

    Assisted Solution

    You might have an easier time searching for "css specificity".

    Also, here's a good (however geeky) explanation of specificity...

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now