[Support request] Setting sidebar size to not shrink with different screens

Home Forums Support [Support request] Setting sidebar size to not shrink with different screens

Home Forums Support Setting sidebar size to not shrink with different screens

  • This topic has 5 replies, 3 voices, and was last updated 6 years ago by Leo.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #541384
    Lori

    Hello,
    I am part of the Mediavine advertising network, and one of their requirements is that the sidebar is at least 300 pixels wide and that it doesn’t shrink below 300 pixels if the browser window size is adjusted or if there is a smaller screen. Is there a way that I can adjust the settings for the sidebar so that it stays at 300 pixels no matter what the screen size is?
    Thank you,
    Lori Elliott

    #541499
    Leo
    Staff
    Customer Support

    Hi there,

    Unfortunately I don’t think that’s possible: https://generatepress.com/forums/topic/fixed-width-in-sidebar/#post-310757

    #542390
    Lori

    That’s really disappointing to hear. I was hoping there would be a way to keep the sidebar at that width. Is there no way at all to work around that? I know that there are hundreds of bloggers who use Mediavine who all meet the sidebar width requirement, so it must be possible somehow. Is it just something that’s not possible with GeneratePress in particular?

    #542623
    Tom
    Lead Developer
    Lead Developer

    Give this CSS a shot:

    @media (min-width: 769px) {
        .sidebar.grid-25 {
            width: 300px;
        }
    
        .content-area.grid-75 {
            width: calc(100% - 300px);
        }
    }
    #543011
    Lori

    Thank you for the CSS, Tom. Where would be the best place for me to put that? Should I just copy/paste it into the “additional CSS” of the customizer? Is there a specific place where it needs to go?

    #543056
    Leo
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.