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

Liviu Tudor
Liviu Tudor
7,061 Points

it is not working......what is the problem? i tried short-hand and normal... no way !!!

what did i do wrong ?

index.html
<!DOCTYPE html>
<html>
<head>
    <title>Multiple Background Images</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="sketch"></div>
</body>
</html>
style.css
/* Complete the challenge by writing CSS below */

.sketch {
  background: url('img/smiley.png') no-repeat top-right; 
  background: url('img/texture.jpg') #EED293;
}

From W3c:

When using the shorthand property the order of the property values is:

background-color background-image background-repeat background-attachment background-position

It does not matter if one of the property values is missing, as long as the ones that are present are in this order.

May help.

5 Answers

Try this.

.sketch{
    background:
       url('img/pencil.png') no-repeat left bottom,
       url('img/smiley.png') no-repeat right top,
       url('img/texture.jpg') #EED293;
}
background: url('img/smiley.png') no-repeat top-right; 

Remove the dash in top-right.

Liviu Tudor
Liviu Tudor
7,061 Points

i tried but with no success

What are you actually seeing when you try it? Maybe try the long-hand method again without the dash as mentioned above.

Liviu Tudor
Liviu Tudor
7,061 Points

it worked..thank you guys !!!