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 trialDelicia Wharton
UX Design Techdegree Student 11,098 Pointsbackground 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');
}
2 Answers
nakalkucing
12,964 PointsHi 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
4,989 PointsHey, make sure that the path to image on your computer is the same "../img/mountains.jpg"
Mindaugas Dragunas
Full Stack JavaScript Techdegree Student 16,169 PointsMindaugas Dragunas
Full Stack JavaScript Techdegree Student 16,169 PointsHi,
Try this:
.main-header { background-color: #ffa949; background-image: url('../img/header.jpg'); background-size: cover; padding-top: 170px; height: 850px; }