Archived topic
Global button border
7 replies · Started by Harris on July 14, 2022
Hello,
Is there a way to set a global button border style (i.e. as we can style the button color and hover color via customizer).
That's including the woocommerce buttons.
Not uging GB. Just GP.
Thanks
Hi there,
you can use some CSS to style the themes button eg.
.button {
border: 2px solid #f00;
}
.button:hover {
border: 2px solid #0f0;
}
Hello
I have tried that.
It doesn't seem to be applied i.e. in the password reset form submit button, even using !important
Try this:
.button,
button,
.woocommerce-button button.button {
border: 2px solid #f00 !important;
}
.button:hover,
button:hover,
.woocommerce-button button.button:hover {
border: 2px solid #0f0 !important;
}
Woo removes borders from those buttons so we need to be more specific.
Doesn't seem to work either.
I have to target the specific button in order to apply it.
.woocommerce-ResetPassword .woocommerce-Button
I will check if other buttons override the global settings too and I will individually target them
Thanks anyway.
The CSS i provided works in the developers tools, so the selectors are correct.
Where are you adding the CSS?
I am totally sure your css and the selectors you suggested are correct, David.
I would never have any doubt about it :)
Something / someway seems to override it.
I am adding the css in simple CSS plugin (in the main plugin page) and I have even added it at the end of the rest css being there.
Very odd - I think Woo just goes out of its way to annoy me lol :)
Glad you found a working solution