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 trialPeter Chukwukelu
Courses Plus Student 833 PointsTo give a paragraph a border of 4px solid and red color
To give a paragraph a border of 4px solid and red color
<!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 width: 4px solid;
color: red;
}
1 Answer
Steven Parker
231,248 PointsCSS properties don't have spaces in their names. And the shorthand property that lets you set all the values for a border at once is just simply "border".
And with that property, you can set the size, style, and color all on the same line.
Peter Chukwukelu
Courses Plus Student 833 PointsThank you so much @Haydn and @Steven. I really appreciate.
Haydn Ellen
Python Development Techdegree Student 22,243 PointsHaydn Ellen
Python Development Techdegree Student 22,243 PointsYou are almost there! You have specified color as red, however that will make the paragraph text red and not the border, you just need to add the color property to the actual border itself. And you have the border property slightly wrong, you should be looking along the lines of border: 4px solid ???; and the question marks are where you need to put the color.