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
Namrata Kakade
2,128 PointsHelp me in Adding Image using url in CSS ..... :(
I m trying to add background image in css.But it doesn't display on the web page. background-image:url('image/backimg.jpeg');
plz help me out....
1 Answer
Chase Lee
29,275 PointsDo the extension .jpg instead of .jpeg. Also is you CSS file in a folder that is a sibling of you image folder? If so the put ../ before your path like this:
url ('../image/backimg.jpg');
Hope that helps.
Namrata Kakade
2,128 PointsIts done.....Thanks.Actually i totally forgot about '../ this. :) I will keep this in mind from now.thanks again :)
Chase Lee
29,275 PointsNo prob.
Lidija Novakovic
6,634 PointsLidija Novakovic
6,634 PointsThere are so many things that can be wrong... Can you please provide the html code?
Check that the path to the image is correct and also that the image exists. Where is your CSS file? In root?
Cheers