Design comparison
SolutionDesign
Solution retrospective
I have a problem with cta. How do I make the width of the button always 100% in the box - padding instead of me having to always set the width in every media query? Please, your feedback is helpful for me.
Community feedback
- @asifm37Posted about 3 years ago
If you have a div container as the parent element for your button, you can use 100% The button will always be the full width of the container.
0 - @hafizanadliPosted about 3 years ago
Hey, you can just add width:100% to the btn class. Instead of set the padding.
0@frontendnusPosted about 3 years ago@hafizanadli I have tried it and the text must go down
0@hafizanadliPosted about 3 years ago@frontendnus don't add left and right padding in btn class. Only set top and bottom padding
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord