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 trialRuby Wallace
160 PointsSet the border color for <p> element
Struggling with setting border color in CSS.. working on it for long time. Thanks
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p class = "main-pg" > My amazing website</p>
</body>
</html>
class = .main-pg {
<p >styles: bordercolor: red; property: border-radius:4px;
}
2 Answers
Steven Parker
231,248 PointsThere's a few syntax issues with the CSS:
- putting a period in front of a class name identifies it, you don't use the word "class"
- the settings inside the CSS rule block are styles, but the word "styles:" is not used
- part of each setting is a property name, but the word "property:" is also not used
- CSS code will not contain complete HTML tags (like "<p>")
- the property name "border-color" should have a hyphen
Also, this challenge doesn't ask for a "border-radius" to be set. But some of the border properties still need settings.
Ruby Wallace
160 PointsExactly, it did ask for border-radius of 4 and property did not work, so I just stopped because I ended up losing work on the screen before it. At that point I know I needed a break! Lol!
Steven Parker
231,248 PointsCurious — I ran through the challenge and didn't see "border-radius" in the instructions.
But glad I could help, Ruby Wallace. You can mark a question solved by choosing a "best answer".
And happy coding!
Ruby Wallace
160 PointsRuby Wallace
160 PointsThanks had everything written but property, it wasn't clear enough in video.