Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.