[Support request] Elements Right Sidebar

Home Forums Support [Support request] Elements Right Sidebar

Home Forums Support Elements Right Sidebar

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1662337
    David

    Hey GP,

    I could not get this css to work:
    https://generatepress.com/forums/topic/how-make-a-block-which-replace-right-sidebar-to-stay-sticky-on-scroll/#post-1389742

    So, I found this using Chrome inspect:

    This inline style is taking precedence over the css provided in the link above and so I get no sticky.

    Do you know why this is happening?

    #1662352
    Ying
    Staff
    Customer Support

    Hi David,

    Did you forget to attach the screenshot πŸ™‚
    Could you link us to the site in question using private info field?

    Thanks!

    #1662359
    David

    The inline style is style = height auto !important in the class inside-right-sidebar

    #1662387
    Ying
    Staff
    Customer Support

    Hi David,

    I don’t see the CSS height: auto!important;in your site, and even I deleted the !important from the CSS height:100% !important;, the block is still sticky:)
    https://www.screencast.com/t/xrMiNVzn89N

    Have you sort it out yourself already?

    #1662710
    David

    Can you see it now?

    #1662951
    Elvin
    Staff
    Customer Support

    Hi there,

    The inline style you see is being added by a script. It’s messing up with the position: sticky CSS.

    Can you try disabling all plugins go one by one to find the culprit? Let us know.

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

    #1663488
    David

    It was not the plugins. I checked them by one. It is google Adsense. When I remove the ads from the page the inline style is no longer present.

    #1663693
    Ying
    Staff
    Customer Support

    Hi David,

    Give this CSS a try:

    .inside-right-sidebar > .gb-container {
        display: flex;
        height: 100%;
    }

    Let me know πŸ™‚

    #1663838
    David

    Here is the css I use (and it works)

    /* Sticky */

    @media
    (min-width: 768px) {
    .right-sidebar .site-content {
    display: flex;
    }
    .inside-right-sidebar {
    height: 100%!important;
    }
    .sticky-block {
    position: -webkit-sticky;
    position: sticky;
    top: 60px;
    }
    .inside-right-sidebar > .gb-container {
    display: flex;
    height: 100%!important;
    }
    }
    /* Sticky */

    as long as I do not place ads in the sidebar.

    #1663856
    Ying
    Staff
    Customer Support

    As long as it works πŸ™‚

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