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 trialBenoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 PointsGive the paragraph a border that is 4px wide, solid and red. Bummer! You need to set the border color for <p> elem
;main-pg{ border:4px solid red; }
this program never pass with the error message above?
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<p class="main-pg">My amazing website</p>
</body>
</html>
p .main-pg {
border: 4px solid red;
}
3 Answers
Tyler Maxwell
Courses Plus Student 42,021 Points.main-pg {
border: 4px solid red;
}
You don't have to add the 'p' to the class selector. try the code above. Good luck.
HIDAYATULLAH ARGHANDABI
21,058 Pointsif you put the paragraph p element then no need for the class. It is correct any how but the tree house work spaces are programmed according to real world problem so please remove the class selector
Dave StSomeWhere
19,870 PointsIt is because you are using a Descendant combinator and it is looking for an element with the class of .main-pg that is a descendant of a <p> element.
Why are you specifying a class?
Benoit Tordeurs
Full Stack JavaScript Techdegree Student 9,400 Pointshello Dave, Many thanks for your help!
I think you are right but my programming doesn't work out ?? What do you advise me?