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

HTML Build a Simple Website Text Editors and HTML Images and Lists

Adding a background image to body

Im having trouble adding the img to the body. Can somebody help me?

5 Answers

Anthony Moore
Anthony Moore
2,282 Points

You would be looking at something like this

body {
   background: url(../path/to/img/image.png);
}

You can adjust some other background styles depending on what you are trying to accomplish.

Anthony Moore
Anthony Moore
2,282 Points

You may want to use CSS to add an image to the body. Is this for a background image for your site?

Yes its for a background img site.. Thanks for the help fellas.

That helps a lot bro.