Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,650 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 :-)