Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKate Wilson
2,915 PointsHere is how I made the button change colors when active: .button:active { background-color: red; } What's wrong?
Can someone please explain why this is a bad idea? I guess it would change all the buttons and this might not be a good thing? Thank you!
2 Answers
Kate Wilson
2,915 PointsThank you for explaining it!! Makes sense!
Steven Parker
231,275 PointsThis would only change the active color on the items you give the class "button" to. It's not a "bad idea" from the standpoint of overall design, but this particular exercise was to practice creating selectors for existing HTML (and not changing the HTML itself).
So since this technique requires altering the HTML to add the class, it's not within the scope of this practice exercise.
Steven Parker
231,275 PointsSteven Parker
231,275 PointsKate Wilson — normally you'd set "best answer" on the one that helped resolve the question! :see_no_evil!: