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.

General Discussion

Blueprint Challenge help

Probably (definitely) a simple answer, but I can't figure it out. Here's the part I'm stuck on:

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.

Here's my HTML:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title> My Page</title>
    <link rel="stylesheet" type="text/css" media="screen" href="style.css" />
    <!-- Hint: You can edit style.css from the CSS
    Tab -->
  </head>
  <body>
    <div id="wrapper">
      <div id="content">
        <h1 id="title">Title</h1>
        <span class="sticky">text goes here</span>
      </div>
    </div>

  </body>
</html>

Here's my CSS:

/* Complete the challenge by writing CSS below */

#wrapper {
  line-height: 32px;
}

#content {
  background: #fff;
  margin: 20px;
  padding: 10px;
  border: 2px solid #000;
}

#content h1 {
  float: left;
}

.sticky {
    margin-right: 5px;
  margin-top: 5px;

}

Not quite sure what I'm missing in the "sticky" class, any help would be much appreciated :)

4 Answers

I think you need

.sticky  {
    right: 5px;
    top: 5px;
    position: absolute;
}

Hope it helps, Cheers!

You are right! Thank you for the help, I had forgotten how to do this :)

You're welcome ;)

Wooh-hoo teamwork! High-fives guys :)