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 trialMichelle Wisdom
2,115 Pointsi am stuck trying to create a rule for the .main page class
styles.css
<!doctype html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body> <p class="main-pg"></p>
<p>My amazing website</p>
</body>
</html>
.my-class-boarder {
}
dsx
1 Answer
Busra Tokuc
7,444 PointsHi Michelle, you did very well in the first step. You achieved adding a class called "main-pg" to the paragraph element. In the second step, you should create a rule for this class. To select elements with a specific class, write a period (.) character, followed by the class name. Check this for CSS Selector
.main-pg{
}
Then in the last step, you can give the paragraph a border like this.
.main-pg {
border: solid 4px red;
}