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 Basics (2014) Basic Layout Backgrounds: Color and Images

manideep m
manideep m
1,964 Points

mountains image does not appear

I am doing coding parallel with the instructor in my sublime text editor. even though all my files are in the same folder. I am not able to get the image.

background-image: url('C:\Users\manideep\Desktop\web learning\mountains.jpg'); all my files are in web learning folder. I have not created separate folders for images and style sheets.

why it is not working .please help me

2 Answers

Matthew Long
Matthew Long
28,407 Points

The path is incorrect. Looks like you're using the path you would see using windows explorer? You need to select the image relative to the css file you're working in. It will likely look something like:

background-image: url('/mountains.jpg');
Steven Parker
Steven Parker
231,275 Points

If all the files are in the same folder, you should be able to reference them by name alone:

    background-image: url('mountains.jpg');

thanks