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 trialJeff Bergstrom
2,982 PointsPlease Help! Problem with code challenge!
I am having a problem with the code challenge. I answer question 3 correctly which is
.main-header {
background-image: linear-gradient (steelblue, darkslateblue);
}
then when I attempt to answer question 4 as this
.main-header {
background-image: linear-gradient (at top steelblue, darkslateblue 90%);
I continually get an error message that says task 3 no longer passes and the "check work" box says "go to task three" which I go back to, re-submit and go through the same thing again. It won't let me answer question 4. And it doesn't say "Bummer!" I got it wrong, it keeps telling me that now question 3 is no longer passing. Any ideas? Super frustrating.
2 Answers
Patrick Hager
15,539 PointsA couple of issues I'm noticing. First the correct syntax is "to top" not "at top". You're also missing a comma after the "to top" statement. Finally you're missing the closing curly brace.
Don't worry, syntax is probably the biggest frustration I've found in this program (and coding in general) if you're not super OCD about every little detail, it's going to bite you. Sooner or later it starts to become second nature (not that I'm there yet myself).
I've found that when I get stumped, going to developer.mozilla.org will help a lot in learning the syntax subtleties and can make everything a lot more clear.
Good Luck!
Jeff Bergstrom
2,982 PointsAhhhhh it was the comma after "to top"! I wasn't sure if it was at top or to top but neither was working. It was the comma I was missing. Thank you so much for being another set of eyes!!
Austin Whipple
29,725 PointsThat error is usually the result of a syntax problem with the CSS rather than an incorrect answer, so be sure to check your answer thoroughly for typos.
For instance, if the code you pasted below is accurate to your answer, you're missing a curly brace for the .main-header
style declarations.
Jeff Bergstrom
2,982 PointsAustin thanks so much for your quick response. I inadvertently left the curly brace off when I copied and pasted it but it is in there in the challenge and I'm still getting the same error message. I can't understand it because in task 4 all I do is add the 'at top' and '90%' but change nothing else so I don't understand why task 3 no longer "passes"
Austin Whipple
29,725 PointsAustin Whipple
29,725 PointsFormatted your code a bit. Be sure to check out the Markdown Cheatsheet below the editor for more help.