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

Ian de Jesus
Ian de Jesus
8,559 Points

Code seems correct. What seems to be wrong?

.box { box-shadow: 10px 10px 5px 15px #222; }

2 Answers

Yes, it looks as though you just have the blur and spread radius mixed up.

.box {
    box-shadow: 10px 10px 15px 5px #222;
}
  1. The horizontal offset of the shadow, positive means the shadow will be on the right of the box, a negative offset will put the shadow on the left of the box.

  2. The vertical offset of the shadow, a negative one means the box-shadow will be above the box, a positive one means the shadow will be below the box.

  3. The blur radius (optional), if set to 0 the shadow will be sharp, the higher the number, the more blurred it will be.

  4. The spread radius (optional), positive values increase the size of the shadow, negative values decrease the size. Default is 0 (the shadow is same size as blur).

  5. Color.

CSS Box Shadow

Łukasz Czuliński
Łukasz Czuliński
8,646 Points

It looks fine to me. How is it showing incorrect? Is it in a project or from a Treehouse challenge?

EDIT: Ignore. Didn't see the post before me which specifies it's from a challenge.