Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Foundations The Box Model Positioning Properties

Paul Kooi
Paul Kooi
3,766 Points

Code Challenge 4 of 6

Can't figure out why this doesn't work? Instructions are to select the class Bottom, give it a position of relative, and offset it's position Left 80 px, and up -20px...?

.wrapper{ position:relative; }

.middle{ position:relative; left:100px; }

.top{ position:absolute; top:50px;

.bottom{ position:relative; left:80px; top:-20px; }

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

This is unrelated, but it's good convention and practice to space out your CSS. It isn't required, but it makes it easy to see mistakes, easier to read and pass on to other designers/developers.

.bottom {
  position: relative; left: 80px; top: -20px;
}

5 Answers

You are missing your closing curly bracket on your .top declaration:

.top{ position:absolute; top:50px;

Sure you didn't miss something just passed the question with

     .bottom { position: relative; left: 80px; top: -20px; }

May have been a typo somewhere, darn buggers are hard to spot

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

This works for me:

.bottom {
  position: relative; left: 80px; top: -20px;
}
Steven Litton
Steven Litton
13,520 Points

You may need to recheck your syntax for the third task

Paul Kooi
Paul Kooi
3,766 Points

Thanks guys. I tried it again and got it to work. Can't figure out what I was doing wrong yesterday. Appreciate the help and quick response.

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

Like Michael said,

You were missing your curly bracket to close the statement for the .top