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
Diego Murray
2,515 PointsCSS- background img won't do what i want it to.
How do I set my background image so it is completely visible at all browser widths.
Diego Murray
2,515 PointsThat fixed half of the problem. Thanks
3 Answers
Joel Hernandez
Front End Web Development Techdegree Student 2,571 PointsIn your body target change background-image: no-repeat; to background-repeat: no-repeat; and see if that helps with your desired effect.
Diego Murray
2,515 PointsI'm trying to get the top of my background image to start where my white header stops. That way I can see the full image. Right now the top of my background image is hidden behind the header.
Joel Hernandez
Front End Web Development Techdegree Student 2,571 PointsOkay, so to separate the elements you will need to go to your index.html file and move the opening body tag down to below the /header tag.
Diego Murray
2,515 PointsI believe the <header> is supposed to be nested in the <body> tag at all times. That my be a quick fix that would lead to problems later.
Joel Hernandez
Front End Web Development Techdegree Student 2,571 PointsOkay if you don't want to separate your elements then you can always just position the background image 120px down in the vertical space since your header is 120px.
Change the background-position to: background-position: 0 120px;
Joel Hernandez
Front End Web Development Techdegree Student 2,571 PointsJoel Hernandez
Front End Web Development Techdegree Student 2,571 PointsEDIT: Added this comment to the Answer section