• Resolved Gazzerk

    (@gazzerk)


    I have successfully added links to captions but having trouble overriding the parent rule. The parent rule controls all the link styles but the caption styles are different.

    Here is the parent style:

    #contentwrapper a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px dotted #74b7e8;
    }
    #contentwrapper a:hover {
    color: #74b7e8;
    border-bottom: none;
    }

    I need for the caption to all be gray #737476 but same hover. I added:

    .wp-caption a {
    color: #737476;
    }

    but nothing happened. How do I override the #000 from the parent rule? Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You don’t have enough specificity. Try this instead:

    #contentwrapper .wp-caption a {
    color: #737476;
    }

    Thread Starter Gazzerk

    (@gazzerk)

    Chip,

    Thank you for the quick reply. I don’t know why I didn’t think of that. I was just stuck on that WP caption code and wasn’t thinking straight. It worked!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Styling a link in a caption’ is closed to new replies.