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

CSS CSS Foundations Backgrounds and Borders Box Shadows

Box shadow

How do I set the color #222?

Could you please add your current code?

3 Answers

Jacob Miller
Jacob Miller
12,466 Points

Box shadows are coded like this: box-shadow: x-offset y-offset blur-radius color ; So an example might be: box-shadow: 0px 2px 2px #222;

Bradan Jackson
Bradan Jackson
20,558 Points

The part that you have in here is correct, but you're forgetting the spread.

.box { box-shadow: x-offset y-offset blur spread color; }

Hope this helps!

Jacob Miller
Jacob Miller
12,466 Points

Yeah, forgot about that. Thanks for the correction.