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 trialTanna Van Essen
1,416 PointsI'm not sure what is wrong with my code
See below for my code. I am told that I have not made the border 4px. .main-pg { border-width: 4px; border: solid; border-color: 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-width: 4px;
border: solid;
border-color: red;
}
3 Answers
Alita Edmonds
6,068 PointsHi Tanna! The challenge wants you to write the border as a single property. So to do that you would write: .main-pg { border: 4px solid red; }
Hope this helps and happy coding!
Ben Reynolds
35,170 PointsIf you want to use 3 separate entries, the "border" property should be first (the border has to exist before you can set its width).
I would recommend setting all three at once though in this format:
.main-pg {
border: width style color;
}
Ankur Puri
3,777 PointsYou may want to use border-style
instead of border
to define solid
as the kind of border style.
Additionally, I think the code can be simplified by using a single shorthand notation for border property as:
.main-pg {
border: solid 4px red;
}
Hope this helps! Good luck!