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

mark bernard
mark bernard
1,651 Points

My Gradient is not coming through at all?

.main-header { padding-top: 170px; height: 850px; background: #ffa949 url('../img/mountains.jpg') no-repeat center; background-size: cover;

background-image: linear-gradient (#ffa949, firebrick);

}

3 Answers

mark bernard
mark bernard
1,651 Points

I finally worked it out, I had a space between linear-gradient and the open parenthises

Try

background: linear-gradient(#ffa949, firebrick);
mark bernard
mark bernard
1,651 Points

Thanks for the answer unfortunately it didn't work, not sure what is going on, im just going to open the finished files in the exercise and try and do a CSS comparison.

mark bernard
mark bernard
1,651 Points

not sure what was going on, but I just cut and paste from the other CSS and retyped over the first gradient, "background-image: linear-gradient(#ffa949, firebrick);" and it worked, they were identical so i am really mystified over this one.