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

Development Tools

Graeme McIntyre
Graeme McIntyre
3,095 Points

Bootstrap bg image

In the carousel bootstrap lesson, i'm trying to place a bg image between the nav and the carousel. created a new div w/ container and i can't get it to span the full width of the container. i made my image 1000 px (same size as container). Here is what I'm using:

<div class="container">
 <div class="row">
  <div class="col-md-12 bgimage">
   <div class="bgimage-inside">

   </div>
  </div>
 </div>
</div>
.bgimage-inside {
    padding-top: 37.36%;
    margin: 0 auto;
    background: url(../img/bg.jpg);
    }

Hey Graeme,

When you're posting code to the forums, be sure to wrap it within 3 backticks with a blank space above and below the backticks; otherwise, any HTML elements you post will fail to render. Also the backticks should be on a line by themselves (except for the first which can have a language property) as shown in the image below.

The easiest way to share code (if you're working on this in Workspaces) is to share a snapshot of your workspace. You can see how to do that here: http://www.teamtreehouse.com/forum/workspace-snapshots

code

Graeme McIntyre
Graeme McIntyre
3,095 Points

thanks marcus - apologies. i'm a relative newbie at this forum stuff...

We all are a newbie at something at one point :P

1 Answer

Try adding:

background-size: cover;

It seems like there might be a margin on the div - can you inspect the element in Chrome DevTools and check?