Adding custom css button padding adds padding around the button instead of around the text IN the button

[ad_1]

How do I add padding around the text IN the button in order to make the overall button taller? The style visual editor padding does this, but when I add a custom css class with padding top and bottom it instead adds the padding outside of the button background, so the button size stays the same.

I’m trying to do it with custom css instead of just using the visual editor because the button padding changes automatically on mobile in a way I don’t want, so I would like to apply this custom css on mobile screens while the default padding stays the same on desktop.

I think this should be achievable just by targeting the button text instead? I don’t know how to do that though since the custom css classes are entered into the whole button.

Thanks!!

[ad_2]
1 Comment
  1. Depends on how the button is setup. You can try targeting *.button a* instead of just *.button* and see if that does what you need.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer