- This topic has 9 replies, 3 voices, and was last updated 4 years, 8 months ago by
David.
-
AuthorPosts
-
August 9, 2021 at 10:12 pm #1890080
Ravi Saive
Hi,
All web pages showing “Content wider than screen” errors while testing AMP pages. Please see the screenshot here – https://ibb.co/1Tw1Ph2
Let me know how to fix it..
August 9, 2021 at 11:45 pm #1890144Elvin
StaffCustomer SupportHi there,
Perhaps some contents are overflowing outside the viewport size.
Applying this CSS normally addresses this issue.
html, body { overflow-x: hidden; }It’s worth a try. Here’s how to add CSS – https://docs.generatepress.com/article/adding-css/
August 10, 2021 at 1:17 am #1890221Ravi Saive
Will it affect Site design or SEO? actually, I am getting that error when accessing the pages with AMP. So which AMP plugin is good with the Generatepress theme?
August 10, 2021 at 5:09 am #1890426David
StaffCustomer SupportHi there,
that code Elvin provided simply stops content from overflowing the width of the viewport.
But as you said the issue is with your AMP pages.
The plugin you’re using is replacing the GP Theme, so GP has no bearing on it.The problem i see is you’re using the
<pre>element for displaying blocks of code. By default the pre ( preformatted ) displays exactly as it is in your editor, which means a long line of text will overflow a smaller width device.That can be dealt with in a few ways with some CSS:
1. Force the text to wrap:
.amp-wp-article pre { white-space: pre-wrap; }2. Make the container scrollable:
.amp-wp-article pre { overflow-x:scroll; }But you should raise the issue with the AMP Plugin developer.
August 10, 2021 at 8:16 am #1890856Ravi Saive
What If I don’t use AMP, will the generatepress theme render properly on all mobile devices?
August 10, 2021 at 8:26 am #1890866David
StaffCustomer SupportYep – the theme is fully responsive.
August 10, 2021 at 9:07 am #1890923Ravi Saive
I have added the given CSS code for pre-tag, but still, AMP pages throwing the error “Content wider than screen”. Any solution?
August 10, 2021 at 9:11 am #1890925David
StaffCustomer SupportYou will need to check with the AMP developer on how to add that CSS ( or for them to fix), as adding it to the Customizer or theme styles probably isn’t going to load on AMP. Its effectively a different site.
August 10, 2021 at 9:19 am #1890940Ravi Saive
Got it thanks for the great support.. 🙂
August 11, 2021 at 1:59 am #1891636David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.