generatepress icon indicating copy to clipboard operation
generatepress copied to clipboard

Full width containers overflow the viewport

Open stacyk opened this issue 2 years ago • 0 comments

Description

When using a full width container without a sidebar, the content in the container will overflow the left side of the page if scrollbars exist (I believe due to the use of 100vw in the calculation)

.no-sidebar .entry-content .alignfull {
    margin-left: calc( -100vw / 2 + 100% / 2);
    margin-right: calc( -100vw / 2 + 100% / 2);
    max-width: 100vw;
    width: auto;
}

Maybe it has something to do with how it is nested and I'm not sure if there are great solutions that wouldn't require javascript to detect scroll bars?

Screen Shot 2022-11-04 at 3 22 03 PM

stacyk avatar Nov 04 '22 20:11 stacyk