If just one block extends beyond the product page, measure it and its parent. In a local test, the container followed the viewport width while the block kept a minimum width of 960px.
Start with the outer content container
In the target Store View, check the product width and Force width on all pages. When forced width is enabled, version 0.1.30 picks the global value. In the example, the product setting 80% set the width of #maincontent. Hyvä Layout documentation.
| Viewport | Block parent | Block before | Block with rule disabled |
|---|---|---|---|
390 | 312 | 960 | 312 |
1024 | 819 | 960 | 819 |
1440 | 1152 | 1152 | 1152 |
Find the rule for the affected block
In developer tools, follow the element tree from #maincontent to the nearest container and the block. Compare computed width, min-width and max-width. In the fixture, the local minimum widened the block despite max-width: 100%. Temporarily disabling the minimum made it fit its parent at all three widths. CSS sizing rules.
Change the declaration at its source
Record the selector and the stylesheet or inline style that supplies the rule. Apply your change in the affected block or child theme template. Rebuild the theme stylesheet if the change requires new Tailwind classes. Check the same product and a neighboring block at the same three widths. Hyvä child themes.
Hyvä template modifications for Magento 2 · Configure content width and the product page.
