[Support request] How to make ads sticky in right sidebar

Home Forums Support [Support request] How to make ads sticky in right sidebar

Home Forums Support How to make ads sticky in right sidebar

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2011826
    Camilla

    Hello,

    I’d like to add one ad unit to the right side bar and make it sticky. How can I do it via CSS?

    I’ve searched on the forum but still have no idea how to add specific ads unit tag. This is the ads unit tag:

    Thanks advance for your help.

    Camilla

    #2012068
    David
    Staff
    Customer Support

    Hi there,

    the CSS will vary depending on how it is added to the sidebar.
    If you can share a link to a post where i can see the advert in the sidebar then i can advise.

    #2012869
    Camilla

    Hi David,

    This is one of the posts on my site:

    https://mostechtips.com/fix-new-world-stuck-on-loading-screen-issue/

    #2013042
    David
    Staff
    Customer Support

    I am not seeing any advert in the sidebar ?

    #2013922
    Camilla

    Sorry. The advert is available now.

    #2013929
    Elvin
    Staff
    Customer Support

    Hi Camilla,

    I’m seeing 2 ad widgets on the sidebar of your site. Would you like both to be sticky?

    If that’s the case, try adding this CSS:

    .inside-right-sidebar {
        min-height: 100%;
    }
    
    aside.widget.inner-padding.moste-widget {
        position: sticky;
        top: 60px;
    }
    
    aside#block-3{
        position: sticky;
        top: 400px;
    }

    If it’s only for the last widget, try this CSS:

    aside#block-3{
        position: sticky;
        top: 60px;
    }

    A wise man once said:
    "Have you cleared your cache?"

    #2013946
    Camilla

    Hi Elvin,

    Thanks for your help. I tried to make the last widget sticky by using the second CSS code you provided, but it doesn’t seem to work. The ad is not sticky.

    #2013951
    Elvin
    Staff
    Customer Support

    Ah I forgot to mention that you should always include this part:

    .inside-right-sidebar {
        min-height: 100%;
    }

    This CSS makes the path for the sticky-ness. ๐Ÿ™‚

    A wise man once said:
    "Have you cleared your cache?"

    #2014110
    Camilla

    It worked. Thanks Elvin.

    #2014114
    Elvin
    Staff
    Customer Support

    Nice one. No problem. Glad to be of any help. ๐Ÿ˜€

    A wise man once said:
    "Have you cleared your cache?"

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