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

Fred Barker
Fred Barker
8,758 Points

Relative path problem in CSS3: Web Fonts: Project: Part 2.

Hi guys, I'm following along with the video for CSS3: Web Fonts: Project: Part 2 and I'm trying to link to a background image using a relative path but it won't work for me.

Here's the code:

background-image: url('../images/static.png'), -webkit-gradient(radial, center, center, 0, center center, 300, from(#094a32), to(#01150f));

Does that look right to you? This happened yesterday in the shadow property exercise too. I'm using Dropbox for the project files. Not sure if that makes a difference.

3 Answers

James Barnett
James Barnett
39,199 Points

It's hard to say for sure, as it all depends on your directory structure of course.

Here's a quick primer on absolute paths that may help you out

Fred Barker
Fred Barker
8,758 Points

I think I have it right but there's still nothing showing up. The directory structure is as downloaded off Treehouse. I'm trying to jump out of the folder I'm in (CSS) and then into the images folder which is in the same directory as the CSS folder. Very odd.

James Barnett
James Barnett
39,199 Points

Post your code up on codepen.io so we can see the bigger picture