• Resolved jklarich

    (@jklarich)


    Can I make my link colors different when they are in the body of my pages compared to those that are in the widget areas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi jklarich. If by “body” you mean the main content area, yes. Use this CSS:

    /* content area links red */
    .content a {
        color: #f00;
    }
    Thread Starter jklarich

    (@jklarich)

    That didn’t work. The links in the main content area (like my home page) didn’t change.

    Here is the link to my site:

    http://grangerwashington.org/

    OK, so the “body” includes the entire page. What I gave you above is the middle content area. If you want to change the links in the widgets, try this:

    /* widget links red */
    .widget a {
        color: red !important;
    }
    Thread Starter jklarich

    (@jklarich)

    This worked for the widget link colors, but the content area links are only black (which is the hover color). Here is the code I put in for content (as above)

    /* content area links blue */
    .content a {
    color: blue;
    }

    My site is http://grangerwashington.org/

    What am I doing wrong?

    It may be that’s it’s overridden by the theme CSS. Try using the !important rule:

    /* content area links blue */
    .content a {
        color: blue !important;
    }
    Thread Starter jklarich

    (@jklarich)

    Perfect! Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Link Colors Different in Page Body then in Widgets’ is closed to new replies.