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

Why is my code not working? I am lost with this border-radius

I am little bit confused with this challenge. I tried everything but is not working for me.

index.html
<!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>
style.css
/* Complete the challenge by writing CSS below */

.box {
  border-radius: 10px 10x 15px  5px #222;
}

6 Answers

border-radius does not take a color property, so you should remove the #222 at the end. Your 10px, 5px, 10px, and 15px values are defining the top left, top right, bottom right and bottom left values of the border radius. If you want to also have a visible border around the div, you would declare that separately, for example:

.box {
background-color: #000;
border: 1px solid #222;
border-radius: 10px 5px 10px 15px;
padding: 10px
}

for shorthand if you wanted all corners to have the same value you could also use:

.box {
border-radius: 10px
}
Laura Cressman
Laura Cressman
12,548 Points

I think the question is actually asking you to place a shadow below the box, not a border radius. The syntax for the border radius property can be found here: http://www.w3schools.com/cssref/css3_pr_box-shadow.asp

Try something like this and let me know if it works:

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

Smile more, Laura :)

If it's box shadow you could do something like:

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

There's also an excellent write up on box-shadow here: http://css-tricks.com/almanac/properties/b/box-shadow/

Alright and Laura is not working.

This was the CSS box-shadow exercise. The blur is before the spread.

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

None of it work. I follow the instructions.

Can you post the code you are using again for us to review?

I created a new post with the question