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 CSS Basics (2014) Enhancing the Design With CSS Transparent Gradients and Multiple Backgrounds

Amy Tomey
Amy Tomey
12,845 Points

i added the linear-gradient as specified in the video, and i have no background at all.

my code SEEMS to be identical to the code used. the image was there before i added the code. I feel like I am missing the obvious, but i can't see the forest for the trees.

her is my code: from my css

/* please help*/
.main-header {
  padding-top: 170px;
  height: 850px;

  background: linear-gradient (#ffa949, transparent 90%),
              linear-gradient (0deg, #fff, transparent),
              #ffa949 url('../img/mountains.jpg') no-repeat center;

  background-size: cover;
  }

.title {
  color: white;
  font-size: 1.625rem; /* 26px/16px */
}

Mod edit: added code formatting for readability. Check out the "markdown cheatsheet" linked below the comment box for formatting syntax.

1 Answer

Cameron Childres
Cameron Childres
11,765 Points

Hi Amy,

You're super close! All that's getting in your way is two spaces where they shouldn't be. The linear-gradient() function should have the parentheses touching the function name with no space in between, just like in the url() function. The same goes for any other functions you'll use in CSS in the future.