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 trial

JavaScript Treehouse Club - MASH MASH - JavaScript Stuff You Can Change

change the colour of the answers only

how can I have it so when people click submit the text is in black but I can change the colour of the answers to stick out more? TIA Cheers!


1 Answer

Steven Parker
Steven Parker
229,607 Points

Since the element that contains the answers has an ID of "answers", and each term that is inserted into the text is inside a span element, you can easily add a new rule to the CSS to change the color (to red in this example):

#answers span { color: red; }

You could also add just the property "color: red;" to the existing rule for "#answers p span" at about line 78.