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

Downloading JPG and PNG Files

I downloaded the material for CSS-Backgrounds and Borders-Advanced Backgrounds. The material includes texture.jpg and pencil.png. As with all the videos, I open Sublime 2 and follow every step as it is shown in the video. Unfortunately, after I've entered all the markup and CSS, I open texture.jpg in the browser and I only have a light brown square with rounded edges, rather than a textured square as it appears in the video.

Also when I try to add the pencil.png, it won't post at all. All of the documents are in the same folder as my index.html and style.css.

So my first question is why does the texture.jpg appear different in my browser and second, why might the pencil.png not be appearing at all.

I have copied what I have entered for the .sketch-img in style.css:

.sketch-img {
    width: 700px;
    height: 500px;
    border-radius: 10px;
    background: url('img/pencil.png') no-repeat left bottom, url('img/texture.jpg') #d6bb80;
}

2 Answers

Hi Jon,

You said your pencil.jpg and texture.jpg are in the same folder as your index.html and style.css? Then they shouldn't be :). Just create a folder "img" where you put pencil and texture.jpg, it should work.

It's related to the url paths you added, you indicate the url() to look at a folder img in the current location.

Thank you! Everything works correctly now.

Glad it helped :).