Archived topic
Image center Gutenberg bug - maybe?
5 replies · Started by Jim on July 31, 2019
Hi,
Firstly, I am not using a page builder plugin as I know that Elementor can cause this issue.
My problem is that images do not center within the Gutenburg Image block despite setting the alignment to centered? I did initially solve the problem by giving it a class and setting it to display: block and auto left & right margins. This is a bit of a pain having to assign a class each time so looked on the GP forum and found David's post #751335, which I have now modified to work using...
.wp-block-image .aligncenter img{
margin-left: auto;
margin-right: auto;
display: block;
}
This issue has also been flagged on Github by non-GP users and it seems to suggest it is always a theme issue?
Can you tell me if this is a bug with GP, Gutenburg or something else I'm missing please?
Hi there,
It looks like you're using CoBlocks to put the image and text into separate columns. Where exactly are you wanting the image to show up?
Thanks for the reply Tom.
Yes, I am using Coblocks but I did disable them and still saw the issue. You will see a centered logo below the LH image. This was what I was having trouble centering before I added the CSS.
Ah, missed that image.
Are you removing the default CSS file that Gutenberg adds somehow? Via function or plugin? The CSS you added exists in that file by default, but it's not loading on your site.
Hi Tom, Sorry for the late reply.
I found the problem was being caused by the 'Disable Gutenberg' plugin. I tend to use GP Sections just on the home page, which had previously not been working under Gutenberg so I was using the plugin to disable it on the home page.
I've just noticed GP Sections are working now (with the plugin disabled) is this correct?
Jim
GP Sections should work with or without Gutenberg being active :)