Tagged: button, text, vertical align
Hello!
So I customized the size of the XL button, made it larger. What I couldn’t manage to do however was to get the text to be aligned in the center of the button. How can I vertically align the text within a button to the center?
Thank you!
Hey André!
You can add the below css to the button class
.custom-button{
top:50%;
transform:translateY(-50%);
}
If you have any issues please share the custom css you are using and the link to the page where we can inspect the custom button.
Cheers!
Vinay
It didn’t work. Do I have to put the code into the custom css form within the avia button builder?
Hi!
Please try the below css
NOTE: This will affect all the buttons if you like to target only one button please enable custom CSS class name support
http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and target only the buttons you like using custom CSS clasa name.
.avia_iconbox_title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
Best regards,
Vinay
Thank you so much, Vinnie! That worked just fine! :)