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 CSS Foundations Backgrounds and Borders Advanced Backgrounds

Andrew Lyon
Andrew Lyon
3,901 Points

Code Challenge CSS Stage 7 - code works but not not accepted??

.sketch {
    background: url('img/texture.jpg') #EED293;
  position:relative;
}

.smiley {
  position:absolute;
  top:0;
  right:0;
  z-index:10;
}

.pencil {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index:20;
}

Inside the <div class="sketch"> I've placed the two images, with the classes, as follows:

<img class="smiley" src="img/smiley.png" alt="">
<img class="pencil" src="img/pencil.png" alt="">
Sean T. Unwin
Sean T. Unwin
28,690 Points

Hi there, Andrew.

I have edited your post to show the code correctly. You may click the edit button to see how I did it.

For further reference, when posting code please use the format provided in this thread.

:)

Andrew Lyon
Andrew Lyon
3,901 Points

Hi Sean,

Many thanks - I've not posted before!

:)

3 Answers

Sean T. Unwin
Sean T. Unwin
28,690 Points

To answer your question, without actually answering it myself, you can find hints in the first 3 minutes of the preceding video of the code challenge.

Tip: You don't have to add anything to the html file.

Andrew Lyon
Andrew Lyon
3,901 Points

That's great, thanks! I'll have another bash at it :)

Andrew Lyon
Andrew Lyon
3,901 Points

Got it!!! How did I miss that?! Thanks for your help today.

Sean T. Unwin
Sean T. Unwin
28,690 Points

Fantastic!

It was a pleaure. Have a great day and good luck. :)