[Support request] Removing sidebar only when website is viewed on mobile

Home Forums Support Removing sidebar only when website is viewed on mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #321530
    kyle

    I have a sidebar on my post pages which I would like to keep. However, when the posts are viewed by mobile I would like there to be no sidebar as there is little space, to begin with.

    How can I make this happen?

    Thanks in advance 😉

    #321533
    Leo
    Staff
    Customer Support

    Hi Kyle,

    For single posts? If so this should work:

    @media (max-width: 768px) {
        .single .sidebar {
            display: none !important;
        }
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know

    #321631
    kyle

    Thank you, that’s done the trick as far a removing the sidebar is concerned. However, I assumed that once the sidebar was gone the content would have then filled the page but it’s still over to the left as if the sidebar was still there.

    Is it possible to have it fill the available space?

    Thanks in advance

    #321640
    Leo
    Staff
    Customer Support

    Sidebars should be at the bottom of the page instead of side on mobile by default.

    Can you post a link to your site so we can have a look? Thanks!

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