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 trial

CSS

Jan Henckens
Jan Henckens
9,761 Points

CSS Mastery - Last code challenge

Hey guys & gals I'm stuck on the last code challenge in the CSS Mastery course.

The last objective is: Using CSS, set the sticky class to be absolutely positioned 5px from the right of the document and 5px from the top of the document.

The code I have is:

wrapper {line-height: 32px;}

content {background: white; margin: 20px; padding:10px; border: solid 2px black;}

title {float:left;}

sticky {float: right; padding: 5px 5px 0px 0px;}


The preview looks exactly like the objective but it's not correct... I've gone through the whole exercise over 10 times and I'm not seeing it... Any tips are munch appreciated :)

Cheers /J

7 Answers

Caroline Hagan
Caroline Hagan
12,612 Points

Hi Jan,

The reason it fails is because you've set the .sticky to float: right... when the question requests it be...

position: absolute

...tricky but all there on the screen for ya :-)

Jan Henckens
Jan Henckens
9,761 Points

Damn, missed that, thanks :)

Second question: I think it's that "to the right of the document" that's throwing me off.. that html document, the content div,....

Caroline Hagan
Caroline Hagan
12,612 Points

yeah, so "to the right" would be...

position: absolute; right: 5px;

top, left and bottom, all work as above, also.

Caroline Hagan
Caroline Hagan
12,612 Points

Super, hope you pass! :-)

Yay teamwork! Marking this post as "spoiler" to warn other members who take a peek ;)

high fives

Caroline Hagan
Caroline Hagan
12,612 Points

That's a good idea Elizabeth :-)