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
Vertti Honkanen
4,385 PointsGradient in a limited area?
I'm trying to do a gradint on the side of my webpage (just 10-15% of the right and left side, kind of like banners) how would I do this? I'm trying to find something but so far, nothing.
1 Answer
Steven Parker
243,656 PointsThis is pretty easy to do since you can specify multiple "color stop" points along the gradient. Here's an example which gives a color gradient on the left and right 15% of the page:
body {
background-image: linear-gradient(to right, red, white 15%, white 85%, blue);
}