[Resolved] Change link color custum CSS

Home Forums Support [Resolved] Change link color custum CSS

Home Forums Support Change link color custum CSS

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #858667
    James

    Trying to change the color of a specific link.

    I’ve added the following CSS

    a.red-link {
    color: #ee4938;
    }

    Then on the page I’m editing I’ve added red-link to the additional CSS class, which gives me the following

    <h4 class=”red-link”>Example Text</h4>

    Not having any luck.

    GP Premium 1.7.8
    #858791
    David
    Staff
    Customer Support

    Hi there,

    when using a.red-link as your CSS selector the class has to be added to the <a> tag.
    So you’re HTML would look like this:

    <h4><a class="red-link" href="url">My red link</a></h4>

    #860940
    James

    Thanks David. I guess WordPress blocks doesn’t format the code correctly if you add a CSS class then switch the block to HTML edit.

    One more question – I have the primary menu Nav text current colour set to red. This works for each menu link except the home page, titled BLOG. Any ideas why this is?

    #860997
    Tom
    Lead Developer
    Lead Developer

    That usually happens when WordPress isn’t aware of the relationship between the menu and the page.

    Try clicking “View All” in “Appearance > Menus” when looking at the pages box, and choose the “Home” menu item at the top.

    Then you can change the label to “Blog”, and WordPress should be more aware.

    Let me know 🙂

    #861228
    James

    Strange, I had done that when first setting up the primary menu – for some reason it stopped working. Removing, then adding back and renaming the home page worked.

    Love the support on this site – thanks for all the help.

    #861456
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.