Site logo

Archived topic

Text-link color in individual sidebar

5 replies · Started by Gevorg on September 14, 2018

Viewing posts 1–6 of 6

Hello guys,

I was wondering if you could help me change the text (it is a link for now) color of the second sidebar to red.

I read the previous forums and tried to put the code using the id number of the widget which is 3 but nothing worked.

Thank you!

Hi there,

For a paragraph of text you could just add a class to the P tag and style that. Then if you wanted you could use that style elsewhere e.g :

<p class="red-style">My paragraph of text....</p>

p.red-style {
    color: red;
    font-weight: bold;
}

Hi David,

Where do I add this?

p.red-style {
color: red;
font-weight: bold;
}

A tried in the custom CSS but it did not anything to the sidebar's text.

Is this in the widget text itself?

Yes in Additional CSS. But your markup needs to include the class. If you edit the text widget and switch to the text editor you should see this:

<strong><a href="https://url-anonymous" style="
">Get ready for your Exam with this powerful pack of Summary Guides for Organic I and II</a></strong>

So you would do:

<strong><a class="red-style" href="https://wurl-anonymous" style="
">Get ready for your Exam with this powerful pack of Summary Guides for Organic I and II</a></strong>

And your CSS would be:

a.red-style {
    color: red;
    font-weight: bold;
}

David,

Thanks for the help. I couldn't make it work but it's ok, I will leave it as it is for now.

Sorry i should have asked, do you intend to add any other widgets or links in that sidebar that will be a different color?

If not then Customiser > Colors > Sidebar and change the link color there.
Make sure you have the Colors Module activated

This archived topic is closed to new replies.