Design comparison
SolutionDesign
Solution retrospective
How do I make my button text inherit the colour from its div parent class?
Community feedback
- @Onyekachukwu-NwekePosted over 2 years ago
Hello, @Amuwa Timothy just in the button class assign color inherit or the text color you want
button{ color: inherit; } or button{ color: (the text color you want); }
2@Onyekachukwu-NwekePosted over 2 years ago@Iamtimon did you try the second approach inputing the text color of the parent div
button{ color: (text-color); }
text-color is the text color you want to input
1
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