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 trialFrank Gomez
2,127 PointsHow do i make paragraph border red
?
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p class="main-pg">My amazing website</p>
</body>
</html>
.main-pg {border: 4px, solid,
}
2 Answers
Aidan Palmer
5,844 PointsSo you have the BASIC "gist" down of the whole CSS thing. One huge thing that you are missing in making the border red is the "red" value.
So in your css you SHOULD have:
.main-pg {
border: 4px solid red;
}
You do not need commas to separate your "border" values. Also be sure to end each statement with a semi-colon (;) And sometimes I find it easier (and neater) to have your code inside curly braces on separate lines and indented, so as you get more and more elements in your CSS, it is easier to read. Good luck!
Jack Weldon
1,708 PointsHi!
You're missing the attribute that defines the border's color, everything else looks good though. You can add the color like so:
.main-pg {
border: 4px solid red;
}
Or you can separate it out like this:
.main-pg {
border-color: red;
border-style: solid;
border-width: 4px;
}