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
Hillel Berg
11,364 PointsI'm stumped. What does this question want from me? Next, add a background-image property and define a linear gradient
Here's a screenshot http://www.clipular.com/c/5973645339394048.png?k=AeHyyTHzjINrza89aY3kmwmB0RM I have copied over answers from this forum and it still throws the same error.
Bummer! Make sure you're creating the gradient with a 'background-image' property.
5 Answers
Mircea Ungureanu
7,483 PointsHello again, try deleting the "text-align: center;" property and leave just the "background-image: linear-gradient();" one. I just checked it and it works. Hope it helps more than my last answer :)
Mark Truitt
17,230 PointsGood catch there. problem is the way it parses the css and it sees the text-align: center; and throws the challenge thinking you put in the wrong answer. If you want to leave it put the background-image above it.
Hillel Berg
11,364 Pointsi just rearranged them to put the background image on top.
.main-header{
background-image: linear-gradient( );
text-align:center;
}
Correct answer
Mark Truitt
17,230 PointsYa, code challenges can be picky and adding extra things to them normally causes them to fail. I failed to pay attention to everything in your screenshot and did the challenge myself and not what step you were stuck on.
Hillel Berg
11,364 Pointsjust tried it and nope. Thanks anyway.
Mark Truitt
17,230 PointsHi Ken,
Can you tell me which Challenge this is for?
Hillel Berg
11,364 Pointsyes i apologize for not being clearer. This is the code challenge part of css basics the part about gradients.
Mark Truitt
17,230 PointsDouble check the colors it asked for. I just did it and my choices were not red/blue
background-image: linear-gradient( steelblue, darkslateblue );
Hillel Berg
11,364 PointsSorry mark not it either, it honestly seems broken. The question isn't asking for any specific color just Next, add a background-image property and define a linear gradient function as the value.
andres garcia
3,113 Pointsnothing goes inside the parenthesis for this challenge.
.main-header { background-image: linear-gradient() ; }
Rustam Ismailov
6,234 PointsRustam Ismailov
6,234 PointsHi Ken,
Try to created a background-image property without value just background: linear-gradient();