- This topic has 18 replies, 2 voices, and was last updated 3 years, 6 months ago by Leo.
-
AuthorPosts
-
October 1, 2020 at 9:31 am #1467642Saul
Hi,
When adding images to the wordpress blocks of cover, gallery, and image the site page overflows.
Why does this happen and is there a way to fix+prevent this from happening?
October 1, 2020 at 10:19 am #1467728LeoStaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know 🙂
October 1, 2020 at 10:35 am #1467772SaulJust pasted link to private info box
October 1, 2020 at 10:48 am #1467786LeoStaffCustomer SupportI see that you are already using GB so have you considered using the container block from GB to replace the cover block from WP?
Cover block uses a hacky way to make things full width which causes some issue like the horizontal scroll bar.
If you are already using GB then that is definitely the way to go.
Let me know if you need more info.
October 1, 2020 at 10:51 am #1467794SaulI’ve tried using the generate container block for the images as well but I still get the overflow. For example, on the website I contained the images below the cover in a container block. But they still overflow.
October 1, 2020 at 10:57 am #1467801SaulWhen I inspect the webpage and search this code:
var docWidth = document.documentElement.offsetWidth; [].forEach.call( document.querySelectorAll('*'), function(el) { if (el.offsetWidth > docWidth) { console.log(el); } } );
I get all the images overflowing, even the contained ones.
October 1, 2020 at 10:58 am #1467803LeoStaffCustomer SupportK I see several other issues.
– Can you first uncheck aligned full in the image block added inside the container?
– Can you activate this setting in the container block first?
https://www.screencast.com/t/EB5aMyHPOctober 1, 2020 at 11:04 am #1467815SaulI did what you suggested and just center aligned the images.
They don’t overflow but they’re also not full width.
Now, all that’s overflowing is the cover image.October 1, 2020 at 3:34 pm #1468141LeoStaffCustomer SupportThe linked page no longer works for me. Can you double check?
I did what you suggested and just center aligned the images.
They don’t overflow but they’re also not full width.I believe that’s because the images themselves aren’t wide enough. Try something like 2000px.
October 2, 2020 at 8:13 am #1469297SaulHi Leo, Thank you for responding.
You can try now. I created a sample page to simplify everything.
When I add the cover image it overflows.October 2, 2020 at 8:41 am #1469351LeoStaffCustomer SupportWould you mind trying to recreate that Sample cover section with GenerateBlocks only?
So add a container block, set the page to full width:
https://www.screencast.com/t/EB5aMyHPAnd set the container width to full width:
https://docs.generateblocks.com/article/container-overview/#standalone-blockUpload the background image:
https://docs.generateblocks.com/article/container-overview/#background-imageThen add a Headline block for the text:
https://docs.generateblocks.com/article/headline-overview/October 2, 2020 at 8:48 am #1469362SaulThank you for your patience Leo,
I did all the steps above and the image still overflows. but now, there is also a white space on the left side of the iamge.
It almost seems like there’s margin issuesOctober 2, 2020 at 8:57 am #1469380SaulWhen I inspect the page it shows unevenness in the right margin.
October 2, 2020 at 9:00 am #1469385Saulthis helps for a wp block cover image inside a generate block container.
Change wp block cover width to auto
.wp-block-cover, .wp-block-cover-image { width: auto; }
October 2, 2020 at 10:46 am #1469546LeoStaffCustomer SupportSo don’t need the WP cover block at all for this layout.
Can you remove that?
You can achieve the exact same appearance you have right now with just the container block from GB.
-
AuthorPosts
- You must be logged in to reply to this topic.