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

CSS

Problem with image

I am having a problem with my image. I'm attempting to set up a background image that is the full width of the page but only 300px in height. The height appears correct but I'm getting a repeat image. Here is my html and css:

<div class="jumbotron"> <div class="container"> <h1>Heading</h1> </div> </div>


.jumbotron { background-image: url(../img/sepia.jpg); height: 300px; background-size:cover; background-repeat: no-repeat; }

Thanks!

Where is your "jumbotron" class coming from? It doesn't look like it's in the HTML you posted.

3 Answers

It's there. Doesn't look like it copied.

<!--JUMBOTRON-->

<div class="jumbotron">
  <div class="container">
    <h1>Learning to Code from 0 to 60...at 60</h1>
  </div>
</div>

Amendment: this seems to be working fine in Firefox but not in Chrome.

What version of Chrome? Seems to be working fine in Firefox and Chrome (Version 45) in my local development environment.

It's 45 but I'm doing this on my PC at work (shhhh) so perhaps there is a firewall of some sort.