- This topic has 13 replies, 5 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
February 22, 2023 at 11:41 pm #2543551
Shane
Hello, I am facing an issue with button alignment on my GeneratePress website. Despite formatting it to be centered, it automatically aligns to the left side.
I am not aware of such issue before 2023. Can it be caused by the WP or GP update? In the private box below, I have left a link to our site with examples.
Thank you for your assistance.
February 23, 2023 at 12:33 am #2543592Fernando Customer Support
Hi Shane,
Are you referring to the “Get it Free” buttons for instance? There was a recent WP update that remove some default stylings for some of their Blocks. It’s likely that.
Our suggestion is to use GenerateBlocks’ Container and Button Blocks instead.
For now, to revert those, try adding this CSS through Appearance > Customize > Additional CSS:
.is-content-justification-center.wp-block-buttons { text-align: center; }February 24, 2023 at 11:15 pm #2546181Shane
Hey Fernando, I suspect that is the cause. I have implemented your code. And, it seems to have fixed the issue.
Just so I understand your suggestion, do you mean we should use a container first, before we create the button block?
February 25, 2023 at 6:02 am #2546450David
StaffCustomer SupportIf you’re using the core button block, then it should automatically add the container it needs for centring the block
February 25, 2023 at 6:11 pm #2547032Shane
Thanks for chipping in, David. I’m a bit confused. How is the core button block different from the one we use in the GP editor? Are there two button blocks? Appreciate if you can clarify…
February 25, 2023 at 6:15 pm #2547035Leo
StaffCustomer SupportTake a look at this:
https://wordpress.org/documentation/article/buttons-block/
https://docs.generateblocks.com/article/buttons-overview/In short, GP’s button block provides more options to customize.
February 25, 2023 at 6:25 pm #2547040Shane
Thanks Leo.
That is the way I have been using buttons. But, in this case, the WP update seems to effect that.
So, the takeaway is that I still need the CSS code, as the suggested alternative (button block) was already in use and been affected).
Right?
February 26, 2023 at 5:13 pm #2547916Ying
StaffCustomer SupportThat is the way I have been using buttons
You are using the core WP button block, if you need CSS to center the button, it sounds like a WP button.
as the suggested alternative (button block) was already in use and been affected).
We suggested using GB’s button block, it’s alignment will not be affected by WP update. https://docs.generateblocks.com/article/buttons-overview/
February 26, 2023 at 10:46 pm #2548129Shane
Hi Ying, thanks for getting back.
I took another look and think I actually have been using the GP block.
My questions are:
Are these two buttons actually all GP button block? Why is the first one not carrying my formatting set up?
If only the second “Buttons” is the GP button block, then why is it affected by WP update, which caused an alignment issue, although now fixed by the CSS code?
If only the first “Button” is the GP button blocked referred by Ying, then how do I format them?
I have included a link and PIN to the example article below.
February 27, 2023 at 5:59 am #2548487David
StaffCustomer SupportCan you confirm the post Password, the one provided didn’t work
February 28, 2023 at 7:56 pm #2550783Shane
Yes, it’s just numbers in the below.
March 1, 2023 at 2:08 am #2551013David
StaffCustomer SupportI have tried that several times on several browsers and it is not working for me.
March 2, 2023 at 3:23 am #2552452Shane
Hi David, I’m sorry to hear that. Please can you give it a try? I have removed the PIN.
March 2, 2023 at 6:15 am #2552655David
StaffCustomer SupportAh ok,
select the GB Button block, and from its Toolbar, there is an option to “Add to Button Container” then in that containers Layout you can Justify it to Center.
See here: -
AuthorPosts
- You must be logged in to reply to this topic.