Website Building » WooCommerce » How Do I Change the Button Style in WooCommerce?

How Do I Change the Button Style in WooCommerce?

Last updated on January 15, 2023 @ 2:45 pm

It is very easy to change the button style in WooCommerce. You just need to add a few lines of code to your theme’s stylesheet.

In WooCommerce, the buttons are generated using the CSS classes .button and .button-primary. So, to change the style of the buttons, you just need to add some CSS code to Target those classes.

For example, let’s say you want to make the buttons larger and rounded. You would add the following CSS code to your theme’s stylesheet:

button {
  font-size: 18px;
  border-radius: 4px;
}
.button-primary {
  background-color: #0073aa;
}

You can also Target the :hover state of the buttons to change their appearance when someone hovers over them with their mouse. For example, you could make the button background color darker on hover like this:

button:hover {
  background-color: #005b85;
}

There are many other ways you can style the WooCommerce buttons. These are just a few examples. If you need more help, you can always consult a developer or post in the WooCommerce support forums.

PRO TIP: If you are not a experienced developer, we recommend that you do not attempt to change the button style in WooCommerce. Doing so could break your site.

Conclusion

In conclusion, it is very easy to change the button style in WooCommerce. You can do it by adding a few lines of code to your theme’s stylesheet.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.