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

Kyle Clarke
Kyle Clarke
4,680 Points

css

Challenge Task 2 of 4

Next, add a background-image property and define a linear gradient function as the value.

samiff
samiff
31,206 Points

Don't think the challenge/course got linked with your question. Which one are you working on right now?

Jordan Gauthier
Jordan Gauthier
5,552 Points

So let's say you are providing the background for a div. You could do:

div {
    background-image: linear-gradient(to top left, black, white);
}

See these resources for more information. There are also vendor specific linear-gradient functions too, but for the purposes of the challenge, I imagine these are not necessary.

2 Answers

Erik S.
Erik S.
9,789 Points

Hi Kyle, Please see this example ''' .main-header { background-image: linear-gradient(to top, steelblue, darkslateblue 90%); } '''

Kyle Clarke
Kyle Clarke
4,680 Points

thanks Erik but i got the answer i was spelling linear-gradient and i put the R where the A should be n the A where the R should be so i was getting an error.

THANKS THOU....

Kyle Clarke
Kyle Clarke
4,680 Points

never mind got the answer i just made a simple mistake.

THANKS ANYWAYS