[Resolved] Sticky sdebar css help

Home Forums Support [Resolved] Sticky sdebar css help

Home Forums Support Sticky sdebar css help

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1231033
    johnaps

    Hello GP Team!! πŸ™‚

    Can you tell me if it is possible to offset the left sticky sidebar widget to have an y padding from the bottom everytime?
    http://thefinterestcom.kinsta.cloud/uncategorized/hello-world/

    #1231531
    David
    Staff
    Customer Support

    Hi there,

    you would need to look to see if thats an option in the sticky JS script you’re using.

    #1231555
    johnaps

    It does have
    Additional top margin (in px)
    Additional bottom margin (in px)
    options but no matter what value i input, it doesnt do anything i am afraid! I found this plugin i am using from this post https://generatepress.com/forums/topic/sticky-sidebar/page/3/#post-1230620

    #1231557
    johnaps

    Its ok though, if there isnt a ready easy solution for this i ll search around!! Thank you!

    #1231611
    David
    Staff
    Customer Support

    Yeah unfortunately can’t advise on how that plugin operates.

    If its just the one side bar you want to stick then CSS linked below can work for the #left-sidebar too:

    https://generatepress.com/forums/topic/how-to-make-the-sidebar-static/#post-784512

    #1231620
    johnaps

    Thank you David, thats a perfect alternative as i didnt want to use a plugin for that.
    I implemented the css code you suggested and it worked, with a little but on the position of left sidebar.

    View post on imgur.com


    http://thefinterestcom.kinsta.cloud/hello-world/
    Maybe you could also know why this is happening??

    #1231719
    johnaps

    I think i found a solution , but i dont think its a clean one

    
    @media (min-width: 990px) {
    #left-sidebar {
            position: -webkit-sticky;
            position: sticky;
            top: -2%;
    	margin-left: -60%;
    	margin-bottom: 400px;
        }
    #right-sidebar {
    	margin-left: 20%;
    }
    }
    

    Perhaps you have something better in mind?

    #1231822
    David
    Staff
    Customer Support

    Looks good to me πŸ™‚

    #1231823
    johnaps

    Good to hear that πŸ™‚ !

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