Site logo

[Resolved] How Style Hook Element Links

Home Forums Support [Resolved] How Style Hook Element Links

Home Forums Support How Style Hook Element Links

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1380134
    RJ

    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

    #1380303
    David
    Staff
    Customer Support

    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 ?

    #1380344
    RJ

    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.

    #1380400
    David
    Staff
    Customer Support

    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.

    #1380506
    RJ

    That did it. I had it in after_main_content.

    Thanks for that, David.

    #1380677
    David
    Staff
    Customer Support

    Glad to be of help

    #1381454
    RJ

    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

    #1381534
    David
    Staff
    Customer Support

    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 ?

    #1381666
    RJ

    Thanks for the copyright code.

    I tried to create a blue button, but it ends up looking like this:
    https://robinharford.com/test/

    #1381772
    David
    Staff
    Customer Support

    Use this selector in your CSS:

    body:not(.blog):not(.archive):not(.search) .inside-article a:not(.gb-button), 
    .copyright-bar a {
    #1381789
    RJ

    That worked. Many thanks, David. Appreciate it.

    #1382010
    David
    Staff
    Customer Support

    You’re welcome

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.