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
Eli Simmons
Courses Plus Student 4,148 PointsBox shadow troubles
Hi, has anyone tried making a box shadow into a perfect sphere around an image with rounded corners?
I keep getting derpy results :P
This is the closest I got:
.lightbulb { margin-left: auto; margin-right: auto; display: block; border-radius: 50%; background: red; box-shadow:10px 15px 50px 15px #F1E767;
}
1 Answer
Daniel Box
1,939 PointsLooks like you've done a pretty good job, you could play around with the values to get a more even sphere, does that help?
box-shadow: none|h-shadow v-shadow blur spread color |inset|initial|inherit;
set h-shadow and v-shadow to same value, play with blur and spread to get what you like.