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 Compass Basics Spriting with Compass Creating a Sprite Sheet

Max Weir
Max Weir
14,963 Points

Image path not found

Followed it step by step and all worked as it should, but the url in the css is pointing to the right location but it doesnt display the sprite. If I inspect the icon url and change to "../img/icons-s2d60bc30dd.png" it works. the default output is "url('/img/icons-s2d60bc30dd.png')"

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi Max,

Based on how the course goes and the URL that's been generated you have relative_assets set to false in your config.rb file, set that to true, restart the compass watcher and you should see ../ in your path instead of just a forward slash.

Compass Configuration Reference

Max Weir
Max Weir
14,963 Points

Thanks heaps! I watched Gills video on compass paths also which answered everything :-)