Site logo

Archived topic

Setting sidebar size to not shrink with different screens

5 replies · Started by Lori on April 4, 2018

Viewing posts 1–6 of 6

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

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?

Give this CSS a shot:

@media (min-width: 769px) {
    .sidebar.grid-25 {
        width: 300px;
    }

    .content-area.grid-75 {
        width: calc(100% - 300px);
    }
}

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?

This archived topic is closed to new replies.