[Resolved] The Right sidebar overlays on top of the left sidebar on mobile.

Home Forums Support [Resolved] The Right sidebar overlays on top of the left sidebar on mobile.

Home Forums Support The Right sidebar overlays on top of the left sidebar on mobile.

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #1963584
    Onur

    Thanks, I will try. Btw, I tried solutions here for GP but to make the left or right sidebar sticky is not worked. How can I make for example left siderbar widgets (all) stick?

    https://www.wpglossy.com/wordpress-sticky-sidebar/

    #1963586
    Onur

    Hi Ying, this solution as I see not responsive especially google ads it may create overlaps?

    #1963599
    Ying
    Staff
    Customer Support

    You need to add media query like David and Elvin’s CSS, so the sticky only works on desktop:@media(min-width: 769px)

    #1963601
    Onur

    Literally, I could not solve this problem. πŸ™‚ Frankly speaking, making a thing sticky should not be tough.

    Why below code is not working?

    @media(min-width: 769px) {
        .site-content {
            display: flex;
        }
        .inside-left-sidebar {
            height: 100%;
            min-height: 100%;
    	position: sticky; 
            position: -webkit-sticky;
            top: 60px;
        }
    }

    I cannot make the sidebar sticky. Left or right does not matter.

    #1963602
    Onur

    I tried that one before David’s posted it. The problem again even on a desktop it creates problems. I am working with a laptop + a big monitor. On the laptop, the ads are showing rectangles and long, on the big monitor because of responsiveness they are becoming square.

    #1963614
    Onur

    I tried the things which David shared here: https://generatepress.com/forums/topic/how-to-make-the-sidebar-static/

    No luck. πŸ™

    #1963615
    Ying
    Staff
    Customer Support

    If you want the entire sidebar sticky, you don’t need to make widget sticky one by one.
    Try this:

    @media (min-width: 769px) {
     .inside-left-sidebar {
        position: sticky;
        top: 100px;
    }
    }
    #1963616
    Ying
    Staff
    Customer Support

    How about you tell us what exactly you want?

    Entire left sidebar sticky?

    And which widgets of right sidebar to be sticky so we can write the exact CSS to solve your problem?

    #1963623
    Onur

    Yeap. The left-sidebar is worked perfectly. πŸ™‚

    I will now check, your other solution about making any widget sticky and also responsive. If I cannot solve it, I probably merge two ads in one widget with a space. Currently, the right-sidebar is like that. I am doing some trials. πŸ™‚

    Thanks a ton for the prompt replies Ying! πŸ™‚

    #1963625
    Ying
    Staff
    Customer Support

    No problem πŸ™‚

    Keep us updated!

    #1963659
    Onur

    Right now, I just merged the google ads in one widget and used below CSS.

    I do not know what kind of solution did they do for the below plugin?

    https://wordpress.org/plugins/q2w3-fixed-widget/

    Before, I was using it, and whenever I set a widget sticky with a checkbox after that widget the rest of the elements also getting sticky. Your solution in your previous reply worked but as I said it is not a responsive solution.

    The thing is if I can calculate the one level up element’s size and automatically calculate the second element’s top pixel value then it will be responsive. But I do not know how to do it in CSS. πŸ™‚

    #1963704
    Ying
    Staff
    Customer Support

    The plugin uses JavaScript.

    The CSS solution will need to calculate manually.

    You now have 2 ads in the last widget of right sidebar, it seems working fine.

    Can you add all the ads in so I can see if I can get the height of each one?

    #1963731
    Onur

    Yes, I was thinking the same about JavaScript usage. Currently, I have two ads and it is working fine. I think with CSS we can achieve this. Right now it is fine Ying. If I need extra help, I will let u know. Thank you so much. Also, I have checked the page speed score. Disabling the plugin increased some metrics.

    https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.swtestacademy.com%2Fxpath-selenium%2F&tab=desktop

    Thank you! πŸ™‚

    #1963740
    Ying
    Staff
    Customer Support

    You are welcome!

    JavaScript slows site down that’s for sure πŸ™‚

Viewing 14 posts - 16 through 29 (of 29 total)
  • You must be logged in to reply to this topic.