HI,
I want to resize the CTA button on a single product page to fit the container.
I used this CSS code to do so:
.single_add_to_cart_button.button.alt {
height: 47.35px;
width: 552px;
font-size: 25px;
text-align: center;
}
and it works fine on desktop screen.
I added this CSS code to make a button responsive & adaptative.
@media only screen and (max-width: 480px){
.single_add_to_cart_button.button.alt{
max-width:600px !important;
width:100% !important;
}
.single_add_to_cart_button.button.alt a{
display:block !important;
font-size:18px !important;
}
}
The issues are:
- the button fit the container in small screen BUT it doesn’t in tablet screen
- the font size stay the same as on a big button 25px, it doesn’t fit the button size.
How to fix this please in order to:
-> keep the reagent button on all screens and make it fit the size of the container?
-> make the button text size responsive to fit the button size?
Thank you.