Hi @sandnabba – taking a look at https://villa.sandnabba.se/2023/04/02/golvbyte/ I don’t see the issue at the moment – is that because you’ve rolled back to the older version of WordPress?
If you’re able to upgrade again so I can see the issue in place – I’ll take a look to see if I can make any suggestions.
Hi @jordesign,
Thanks for looking into this!
Yeah, I did a rollback on the main page, but I just setup a copy on https://villa-dev.sandnabba.se/
There I’ve done a full upgrade of both WordPress and the theme.
EDIT: Interesting! On the latest post, it seems like only half of the image blocks got a broken alignment. If you scroll down a bit, some are actually in the right place.
-
This reply was modified 2 years, 3 months ago by
sandnabba.
Thanks @sandnabb – that’s really helpful. It looks like that might be happening when there is no alignment set on the Gallery (as best I can tell).
In either case – can you try adding this CSS code to see if it helps?
.wp-block-gallery:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.aligncenter) {
margin-left: auto !important;
margin-right: auto !important;
}
@jordesign Awesome, thanks a lot!
Yep, that did it. But… is this a bug in the theme, or in wordpress itself?
I’ve not made any choices here really, while editing I’ve just clicked the + button, adding the gallery, adding images, and I’m done.
But, I think I might have solved it without the extra CSS as well. 🤔
Just to find the root cause, I removed the extra CSS and edited the page.
Found that there was an “Align” option when clicking the gallery, that was set to “None”. I did set it to “Center”, updated the page and voila! That seem to have solved the aligment for all galleries, not just the one I edited.
And now, even if I set it back to “None”, It still looks normal!
So… problem solved? Thanks for pointing me in the right direction! 😊
EDIT: Well, it was only for that particular post. The extra CSS is still needed.
Do you think I should report this somewhere?
Best regards
Emil
-
This reply was modified 2 years, 3 months ago by
sandnabba. Reason: Found that it was still an issue on other posts
Hi Emil – as that seems to be an isolated case – I don’t think it needs to be reported anywhere.
Glad to hear that solution worked for you.