Site logo

Archived topic

Buttons displaying Left Aligned

3 replies · Started by Jodie on November 29, 2022

Viewing posts 1–4 of 4

Hi guys

This is so weird!

I have this Additional Custom CSS in my sites for WP Buttons, that I got your help with.

On the site I've shared with you, the buttons are now displaying left aligned where before they were centre aligned.

On my other site they display in the centre.

What can I do to fix this please?
Here's the CSS that is in both sites
/*START of WP BUTTON LINK*/
.wp-block-button__link {
width: 100%;
max-width: 300px;
border-radius: 90px;
margin: 0 auto 10px;
margin-top: 60px; margin-bottom: 60px;
display: block;
font-size: 19px !important;
font-weight: bold;
background-color: #49a964;
background-image: -webkit-gradient(linear, left top, left bottom, from(#38d6c4), to(#1b998b));
text-decoration: none;
color: #ffffff !important
}
.wp-block-button__link:hover{
background-color: #eaa355;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcc7b1), to(#Ff9b71));
color: #ffffff
}
/*END of WP BUTTON LINK*/

As always I appreciate your help.
Cheers Jodie

Hi there,

WP 6.1 made some changes to how it writes its CSS which can lead to some styles to go missing.
Add this CSS to your site to fix that:


body .is-layout-flex {
    display: flex;
    flex-wrap: wrap;
}

And just like that it is fixed!! Thanks so much David. As always I really do appreciate your help.

Cheers Jodie

You're welcome - happy to be of help!

This archived topic is closed to new replies.