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.

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.