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!

https://w.trhou.se/deumwmml6y

1 Answer

Steven Parker
Steven Parker
170,403 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.