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 work disapearing

After I adjusted the main-header class with the background-size property all my css work on the preview have disappeared. I'm sure its not a coding error or network problem. My Work: .main-header { background-color: #ffa949; padding-top: 170px; height: 850px; background-image: url('../img/mountains.jpg'); background-size: 40%; }

This is from CSS Basics Background: Color and Images

Zachary Cericola
Zachary Cericola
9,215 Points
.main-header {
 background-color: #ffa949;
 padding-top: 170px;
 height: 850px;
 background-image: url('../img/mountains.jpg'); 
background-size: 40%; 
}

I took your code and copied and pasted it into the workspace and then saved and refreshed the preview and it works fine. It should have a repeating background image with the lake tahoe header on top of it.

What do you mean by disappeared?

Thank you for replying! I mean that on the preview none of the CSS work is displaying, only the default HTML layout with the images. When I inspected the preview using that cool google thing (don't know what its called but to access it you hold shift ctrl i) an error was detected saying it was 404. When I looked it up 404 meant that the website doesn't exist, but then why would all the HTML be appearing? If you can help that would be great, thank you.