Archived topic
How Style Hook Element Links
11 replies · Started by RJ on July 29, 2020
Hey there - I style my links using this code:
/* Hyperlinks */
body:not(.blog):not(.archive):not(.search) .inside-article a
{
background: linear-gradient(180deg,rgba(255,255,255,0) 50%, #FFFF00 50%);
}
I have some text which includes a link added as an Element Hook inserted underneath all my posts.
How do I style the link so it appears like the rest of my site?
Example: https://robinharford.com/write-anywhere/
TIA
Hi there,
maybe the lack of coffee but the only 'unstyled' links i can see is the menu items in the footer .. what am i missing ?
Sorry about that, David - I was tinkering with the site.
If you scroll to the bottom here:
https://robinharford.com/zagging/
You'll see the sentence:
My newsletter teaches you how to sell more books - click here.
'Click here' is unstyled. How do I make it look like the other links in the body of that page? They are highlighted yellow.
Which hook are you using ?
If you use the after_content hook that would place it within the inside-article container. And your CSS should apply to it to.
That did it. I had it in after_main_content.
Thanks for that, David.
Glad to be of help
Hey there -
1). How would I make the styling apply to my footer links?
2). Also when I create a button using Generateblocks and link it, the button disappears and the yellow styling shows instead. How do I stop this from happening?
TIA
1. You can include .copyright-bar a in your CSS selector.
So this:
body:not(.blog):not(.archive):not(.search) .inside-article a {
becomes:
body:not(.blog):not(.archive):not(.search) .inside-article a,
.copyright-bar a {
2. Can i see an example ?
Thanks for the copyright code.
I tried to create a blue button, but it ends up looking like this:
https://robinharford.com/test/
Use this selector in your CSS:
body:not(.blog):not(.archive):not(.search) .inside-article a:not(.gb-button),
.copyright-bar a {
That worked. Many thanks, David. Appreciate it.
You're welcome