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
harsha praneeth
5,449 Pointshow to add an image in the background
i saved the background image in the ing folder and written the following code for background image
body { font-family: 'Nunito', sans-serif; color: #faf3bc; background: url('img/tileable_wood_textur.png'); }
but i am unable to see the image in the background . so please tell me what to do
3 Answers
Ida Brogie
9,250 Pointswhere is css located? may be it is in a subfolder.. try url(../img/wood_texture.png); the url is relative to the css file.
Phillip 25A
4,963 PointsTry this:
body
{
background-image:url('img/tileable_wood_textur.png');
}
harsha praneeth
5,449 Pointsnot working please u also try with some other image i think its not working out
Phillip 25A
4,963 PointsHarsha,
Hmm I have a hunch as to the problem.
What folder are you putting your CSS files which contains the code above?? What folder are you putting your image files?
harsha praneeth
5,449 Pointsi have saved the images in the file named img
harsha praneeth
5,449 Pointsi have saved images in img folder and css files in css folder
harsha praneeth
5,449 Pointsharsha praneeth
5,449 Pointsits the correct answer, thanks so much for saving my day