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
Shaik Ahamed Rilwan
3,249 Pointsgardient transparent codes does not working
linear-gradient(#ffa949, transparent 90%),
3 Answers
Quang Nguyen
2,235 PointsDear Rilwan,
I think the CSS code should be like this:
background: linear-gradient(#ffa949, transparent 90%);
Because linear-gradient is a CSS function that creates a smooth color transition effect to your image background, not a CSS property. So if you want to make that linear-gradient function to work, you need to apply it to a background property, be it an image or just plain colors.
Cheer, Quang (Farrell) Nguyen
Cale Matteson
11,303 PointsHey Shaik!
Give this a try. I'll use it in a div for example.
div {
background-image: linear-gradient( rgba(255,169,73,1) , rgba(255,169,73,0) 90% )
}
background-image allows gradients, as opposed to background-color. Also this sets your second color to the same color, only 100% transparent. The amount of transparency is indicated by the last number. anywhere between 0 and 1. 0 being transparent, and 1 being full color.
Hope this helps!
Cale
Shaik Ahamed Rilwan
3,249 Pointsthank you guys
Kerry Rosado
14,368 PointsKerry Rosado
14,368 PointsCan you post the full css file to see the rest of your code in order to help