- This topic has 9 replies, 2 voices, and was last updated 5 years, 7 months ago by Leo.
-
AuthorPosts
-
August 8, 2018 at 12:17 pm #643529Janet
I have some heading2’s that I’d like to make links, but when I do, they change to the color for links. Is it possible to have a linked heading2 that stays the same color as other heading2’s? If so, how?
August 8, 2018 at 6:40 pm #643706LeoStaffCustomer SupportHi there,
Where are the H2 links on the page you linked?
I’m not seeing them.
Let me know π
August 9, 2018 at 6:55 am #644032JanetOn home page, http://janetmajure.com. The headings in the columns.
August 9, 2018 at 8:43 am #644215LeoStaffCustomer SupportAh ok those are h3.
So modify the HTML to this:
<h3 class="h3-link"><a href="http://janetmajure.com/editorial/">Editorial Services</a></h3>
Then add this CSS:
h3.h3-link a { color: #000; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know π
August 9, 2018 at 12:13 pm #644382JanetSorry about mistaken heading ID.
Before I launch, please confirm that I’ll need to insert the <h3 class=”h3-link”> for each h3 heading I want to use as link.
Also, does it follow that if I want to make links from any other headings and have them retain the heading-defined color, I’ll have to define a h4 (for example) class for a link in CSS and add h4 class=”h4-link” in the HTML for each heading in question? (Don’t think I phrased that well. Let me know if it’s confusing.)
Thanks for your response.
August 9, 2018 at 12:35 pm #644407LeoStaffCustomer SupportThat case then maybe try adding the class to the link itself:
<a class="heading-link" href="http://janetmajure.com/editorial/">Editorial Services</a>
Then target with CSS:
.heading-link { color: #000; }
Then it shouldn’t matter which heading you are using.
August 9, 2018 at 5:54 pm #644542JanetNot entirely sure I’m following you, as my coding knowledge is basic. Is the following correct?
1. Add the .heading-link business to the CSS.
2. Add the class definition/association/whatever-it’s-called around any heading that I want to act as a link.Net result will be that any heading so defined will use fallback heading color, even if it’s a link.
Is that right?
August 9, 2018 at 6:26 pm #644564LeoStaffCustomer SupportIt should be something like this:
<h2><a class="heading-link" href="http://janetmajure.com/editorial/">Editorial Services</a></h2>
<h3><a class="heading-link" href="http://janetmajure.com/editorial/">Editorial Services</a></h3>
And the CSS would just be:
a.heading-link { color: #000; }
Let me know π
August 10, 2018 at 4:32 pm #645374JanetThanks. I’ll take that to mean I will indeed need to manually redo the HTML for each heading/link, even with addition to CSS (but have to do only one CSS addition). Right?
August 10, 2018 at 6:27 pm #645409LeoStaffCustomer SupportYeah I’d say that’s the easiest way unless you have hundreds of links already.
I only saw three.
-
AuthorPosts
- You must be logged in to reply to this topic.