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 trialjohn knight
Courses Plus Student 9,155 Pointsis there any thing wrong with that syntax?
i were playing with the gradients then i wanted to set my color to top the i said
.333{background-image:linear-gradient(at top,black ,white)}
then the value didn't respond why the value didn't respond?.
john knight
Courses Plus Student 9,155 Pointswell cory... well i think you got me wrong i meant to set the color to top and ends in the bottom but thank you for the answer.
1 Answer
Cory Harkins
16,500 PointsSorry, I just re-read my answer, and it seemed kind of douchey. I apologize for that.
john knight
Courses Plus Student 9,155 Pointsno problem!.
Cory Harkins
16,500 PointsCory Harkins
16,500 PointsFirst: Try not to label your classes as numbers. It's non-semantic, and I don't believe it's acceptable CSS syntax.
Second: When using a linear-gradient, if you are going from top-bottom, bottom-top; you really don't have to specify that "to", when dealing with two colors. Just swap the values if the outcome isn't desired (white, black / black, white).
in HTML:
<div class="box"></div>
in CSS: