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 trialLu Favela
Front End Web Development Techdegree Student 15,570 Pointsbackground-image won't load.
Im trying to include a background image, but won't load on the web browser. Im not sure if Im using the correct file path, or is it because I floated two section elements, and its wrapping the content around those elements. Please help.
<header class="main">
</header>
.main{
background-image: url('images/portland.jpg');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
hight: 200px;
width: 200px;
2 Answers
Tek Dhakal
10,263 PointsIn your stylesheet file, you mentioned you have opened the curly braces, but you have not closed it yet. So that "}" will go right after your last line. Everything looks good to me though.
Em Har
9,775 Points.main{ background-image: url('images/portland.jpg'); background-position: center; background-size: cover; background-repeat: no-repeat; hight: 200px; width: 200px; }
Make sure to add the closing braces! If it doesnt work let us know