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 trialNancy Melucci
Courses Plus Student 36,158 PointsWhy is this not passing - it looks fine in the preview? CSS box-shadow challenge.
css
.box { box-shadow: 10px 10px 5px 15px #222;}
like I said, it looks fine in the preview, I've read the forums and another poster was instructed by Guil to do this. Is there a bug? Or what am I missing?
<!DOCTYPE html>
<html>
<head>
<title>Box Shadows</title>
<link rel="stylesheet" type="text/css" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box"></div>
</body>
</html>
/* Complete the challenge by writing CSS below */
.box { box-shadow: 10px 10px 5px 15px #222;}
2 Answers
Falk Schwiefert
8,706 PointsHere is the order in which the values need to be passed into the property. You can find them here: http://www.w3schools.com/cssref/css3_pr_box-shadow.asp.
none Default value. No shadow is displayed h-shadow Required. The position of the horizontal shadow. Negative values are allowed v-shadow Required. The position of the vertical shadow. Negative values are allowed blur Optional. The blur distance spread Optional. The size of shadow. Negative values are allowed color Optional. The color of the shadow. The default value is black. Look at CSS Color Values for a complete list of possible color values.
In your case you are passing the spread before the blur. Which means the computer will interpret it the wrong way round. Change those 2 values around and you should be golden.
Nancy Melucci
Courses Plus Student 36,158 PointsMuch obliged to you thanks. NJM