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
Torger Angeltveit
11,228 PointsBackground-image not working in workspace
Hello, I cant get my background image to show. I don't see any problems with the code
I have a folder named "img" inside the folder i have a jpg image named "torgerback"
My CSS looks like this:
content-right{
width:40%; height:600px; float:left; background:#FF9933; background-image:url("img/torgerback.jpg"); }
Any idea what the issue could be ?
3 Answers
Lukas Coffey
20,382 PointsHey Torger, just put a period or a hashtag before your 'content-right' selector. If the element has an id, use a hashtag, if it's a class, use a period.
Torger Angeltveit
11,228 PointsThat's not it :(
I had an id on the div, and a #before content-right. Just missed it when i posted this.
Is there anything wrong with workspace or ?
I can't see any reason for it not to work.
Lukas Coffey
20,382 PointsAh got it. Hm, one more thing you could try although it might not do anything, try switching background and background-image. Sometimes the background property will override other properties. Try switching your background to background-color, and background-image to background. See if that does anything.