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
Lori Smith
1,409 PointsProblem 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!
3 Answers
Lori Smith
1,409 PointsIt'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>
Lori Smith
1,409 PointsAmendment: this seems to be working fine in Firefox but not in Chrome.
David Lane
33,414 PointsWhat version of Chrome? Seems to be working fine in Firefox and Chrome (Version 45) in my local development environment.
Lori Smith
1,409 PointsIt's 45 but I'm doing this on my PC at work (shhhh) so perhaps there is a firewall of some sort.
David Lane
33,414 PointsDavid Lane
33,414 PointsWhere is your "jumbotron" class coming from? It doesn't look like it's in the HTML you posted.