Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Whenever I try to add a background image in html, I can only see a small part of it at the very top of my screen.
Whenever I try to add a background image in html, I can only see a small part of it at the very top of my screen. What is going on? I am using bootstrap 4, html and css.
Steven Parker221,292 Points
It would help to have access to the image file, but if that's actually the whole code:
- the outer
divis missing an end tag
- "scr" is not a valid property name (you probably want "src", but then it shouldn't be empty)
- there's no content or CSS setting to give the element any significant height
- the element width is constrained to just over half the window (60%)
For a quick test (but not a solution), instead of "auto", try setting the height to "100vh".