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 trialBenjamin Beezy
7,409 PointsI'm not sure why my .middle isn't passing.
I think I have everything right. Any ideas about what could be happening?
<!DOCTYPE html>
<html>
<head>
<title>Positioning</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="top">Top</div>
<div class="middle">Middle</div>
<div class="bottom">Bottom</div>
</div>
</body>
</html>
/* Complete the challenge by writing CSS below */
.wrapper { position: relative; };
.middle { position: relative; left: 100px; };
3 Answers
Shawn Williams
Courses Plus Student 4,462 PointsHave you tried removing the semi-colons that are located after the brackets? These are not needed.
Shawn Williams
Courses Plus Student 4,462 PointsThe rules are what is located inside the selector. The brackets belong to the selector and not the rules.
samueljhan
1,732 PointsIf you do that then your code is wrong. You don't put the semi-colons inside the brackets because you are not doing JQuery which requires the semi-colon.
Shawn Williams
Courses Plus Student 4,462 PointsSamuel, the semicolons ONLY go inside the brackets in CSS.
Benjamin Beezy
7,409 PointsBenjamin Beezy
7,409 PointsWow. That worked. Thanks so much. However, I always thought it was best practice to put semi-colons after every rule. Is that not the case?