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 CSS Basics (2014) Basic Layout Backgrounds: Color and Images

background image will not show up even with correct code and closing the browser and the workspace and the CTRL R reset

my background image still will not show and i have tried everything. this is from CSS basics with guil, the Lake Taho lesson.

.main-header {
  background-color: #ffa949;
  padding-top: 170px;
  height: 850px;
  background-image: url ('../img/mountains.jpg');  
}
Mindaugas Dragunas
seal-mask
.a{fill-rule:evenodd;}techdegree
Mindaugas Dragunas
Full Stack JavaScript Techdegree Student 16,169 Points

Hi,

Try this:

.main-header { background-color: #ffa949; background-image: url('../img/header.jpg'); background-size: cover; padding-top: 170px; height: 850px; }

2 Answers

nakalkucing
nakalkucing
12,964 Points

Hi Delicia Wharton! you have an extra space between url and (

background-image: url ('../img/mountains.jpg');
                     ^

If you remove that your code should run just fine! :)

Let me know if you need more help. Happy coding!

Dmitry Polyakov
Dmitry Polyakov
4,989 Points

Hey, make sure that the path to image on your computer is the same "../img/mountains.jpg"