None of the code I found on support forums for centering Gravity Forms submit buttons worked, so I had to write my own. The code below is for a specific form and only applies to that form ID. You'll have to replace the form ID number in the code with your own.
#gform_submit_button_9 {
background-color: #ffd40d;
color: #000000;
display: flex;
align-items: center;
justify-content: center;
width: 50% !important;
margin-right:auto;
margin-left:auto;
}
Great, thanks for sharing.
For those of you who want to implement this on ALL Gravity forms, not just for a specific form. You might try this code.
.gform_button {
display: flex;
align-items: center;
justify-content: center;
width: 30% !important;
margin-right:auto;
margin-left:auto;
}
Just work on the width depending on how you want it. 100% makes it full-width.
Thanks
Perfect, thank you,
The CSS code for theme, only center button
#gform_submit_button_6 {
display: flex;
align-items: center;
justify-content: center;
margin-right:auto;
margin-left:auto;
}
This is perfect, edited width to 100% for a larger button too 🙂
Where exactly in word press would I enter this code? Somewhere in Gravity Forms?
Perfect!
YES!