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

CSS CSS Basics (2014) Enhancing the Design With CSS Gradients

Joel Porretta
Joel Porretta
5,079 Points

Problem with CSS gradient task.

Currently on the first task in the gradient section of CSS Basics. My code is as follows: .main-header { background-image:linear-gradient(180deg, steelblue, darkslateblue 90%); }.

For some reason, when I click on check work it tells me that task 3 is no longer passing. I checked further and found it had something to do with the 180deg part. After double checking online, I found nothing apparently wrong with my code. Has anyone else encountered this and if so, how was it solved?

1 Answer

Justin Warren
Justin Warren
7,805 Points

Hi Joel,

So you are really close! This is what you would need to input:

  background-image: linear-gradient(to top, steelblue, darkslateblue 90%);

Here is a good supplement resource for gradients:


Happy coding!

Joel Porretta
Joel Porretta
5,079 Points

Thanks Justin, got it working now :)