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

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 :)