Site logo

Archived topic

Overflow-x issue

3 replies · Started by Ryan on October 14, 2021

Viewing posts 1–4 of 4

It's always difficult to find an overflow issue. I finally narrowed it down to if I use a block with the .alignfull class. Like the following in my home page header. https//www.ryansmithphotography.com

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

For some reason that doesn't seem to be calculating the width quite correct and causing a slight overflow. Using overflow-x:hidden on the element doesn't seem to work. But if I delete the element or set max-width to 99vw it fixed the issue. Do you have any ideas? Thanks.

I realized it was because of scroll bars being enabled on the Mac. That seems to be a known issue. Adding overflow-x: hidden on the body seems to be a good enough solution.

Sounds good :)

This archived topic is closed to new replies.