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
203,226 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.