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


adding an image as background


I'm starting to use bootstrap and I can't add an image as background for my slide items.

I use:

<img src="img/mesa.jpg" alt="mesa" class="img-responsive"></img>

for the 'item active', but it appears as a normal image, not as a background.


1 Answer

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Maria,

You need to add it in your style.css something like.

body {
  background-image: url("img/background.png");
  background-repeat: no-repeat;