Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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