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 triallayeesolo
7,316 PointsWhy 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.
<!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 {
border-radius: 10px 10x 15px 5px #222;
}
6 Answers
mikes02
Courses Plus Student 16,968 Pointsborder-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
12,548 PointsI 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 :)
mikes02
Courses Plus Student 16,968 PointsIf 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/
layeesolo
7,316 PointsAlright and Laura is not working.
Sumiko Gray
21,160 PointsThis was the CSS box-shadow exercise. The blur is before the spread.
.box { box-shadow: 10px 10px 15px 5px #222; }
layeesolo
7,316 PointsNone of it work. I follow the instructions.
mikes02
Courses Plus Student 16,968 PointsCan you post the code you are using again for us to review?
layeesolo
7,316 PointsI created a new post with the question