Last active
August 3, 2021 10:48
-
-
Save divienginesupport/aaaf95bcae52e9a24c1db06e4bc81dac to your computer and use it in GitHub Desktop.
CSS to style Divi WooCommerce Add-To-Cart Icon Button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*CSS to make sure the Quantity and Add to cart button are next to each other*/ | |
.product .cart { | |
display: flex; | |
flex-flow: row nowrap; | |
justify-content: center; | |
margin-top: 10px; | |
} | |
.product .cart button[type="submit"] { | |
margin: 0 10px !important; | |
} | |
/*Styling the Add to cart*/ | |
.woocommerce ul.products li.product .button { | |
font-family: ETModules; | |
border: 2px solid #0df1a5; /* button border color */ | |
color: #0df1a5; /* buttonicon color */ | |
font-size: 20px; | |
padding: 4px!IMPORTANT; | |
border-radius: 100px; | |
height: 45px!important; | |
width: 45px!important; | |
text-align: center; | |
transition: .3s ease; | |
} | |
/*Adding some Hover effect to buttons*/ | |
.woocommerce ul.products li.product .button:hover { | |
background: #0df1a5; /* button background color on hover */ | |
color: #fff; /* button icon color on hover */ | |
box-shadow: 0px 3px 20px #07B98A36; | |
} | |
/*Disables the icon appear when you hover to add to cart button*/ | |
.woocommerce ul.products li.product .button:after { | |
display: none | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment