Buttons have stopped centering

hi - using buttons on our site and they have stopped being centered. Despite looking all good in the editor, when looking at them on the website they have become left-justified.

checked the CSS in the inspector and can see:

.gb-button-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    clear: both;
}

Looks like justify-content should not have flex-start on it.
Is this a bug? I have cleared all caches, tried in private browsing, and different browsers.
On WP 6.1.1 and all plugins up to date. Generate Blocks 1.6.0

Hi @awemous,

For reference, can you provide the link to where we can see these buttons?

Sure, I can send a link to you - how do I do that in a Direct Message or privately?

You can reach out to us here: Support - GenerateBlocks

I don’t see anything on that page you’ve linked to. Do you have a DM system on this?

That link is the GB Support link. You can raise a ticket there. It’s somewhat of a DM perse but more of a mailing system.

Can’t seem to use those links for support.

anyway, problem is at b u d d y crm.com .

I have had to override the left justification with an important! to solve the issue.

I see. To clarify do you have the Buttons Wrapper aligned center? Example: Edit Page “Generated Homepa...

If yes and it’s not working, it may be because of a CSS optimization plugin you have. You can test this by temporarily disabling any caching/optimization plugins or all non-GB/GP plugins to be safe.

Hi - I do not have a CSS optimisation plugin or a cache plugin in place at the moment.

Yes I have set the buttons options to center.

The issue still exists.

I see. Can you point me to where I need to look to see this button on your site?

Can you share a screenshot of it as well?

on the front page there are two buttons, also buttons on the plans page.


front page


this is the picture from the block editor - buttons are centred.

I see. That’s odd.

Can you try regenerating your CSS files in GenrateBlocks > Settings? Or, can you try changing the printing method to inline?

If these don’t work, can you try recreating those buttons?

Thanks. Recreating buttons did not work.
Resaving the embedded method in Generate Blocks->Settings did not work either.

However, changing to inline embedding has fixed the issue, so thank you it appears to be sorted now.

Hope you able to find a fix for the external file css in the future.

I see. Glad it’s working now.

What Dynamic CSS Print Method are you using in Appearance > Customize > General?

Hi - it is set to inline embedding.

perhaps that is the prob? Do generatepress theme and generate blocks need to be set to the same to work?

Hi! I have the same issue. Sometimes CSS regeneration is helping, but not for long. Currently I’m using global styles for Buttons wrapper, that’s helps, but it’s not a solution in long way.

Do you have an optimization/caching plugin? It may be minimizing the CSS which may cause the issue.

Not sure if your question was to me or DamianP.

I answered that at the beginning though. I turned off our cacheing plugin to see if it was the issue but the centering issue continued.

I’d like to be able to turn on cacheing again - are you saying that Generate Blocks can’t be used with a cache plugin?

It’s for Damian.

Caching can be used with GenerateBlocks.

I’m just mentioning to him that most commonly, any type of merging or combination of codes may break a site. See here for more info: Why You SHOULDN’T Combine CSS & JS (performance reasons)

So if you opt to use an Optimization plugin, you need to be aware that this issue can happen if you enable such a setting.