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.

CSS

Sara Parker
Sara Parker
2,238 Points

I need help with my code

https://w.trhou.se/xc0halapx0

The grey square under the pictures won't show. Instead I get it beside and just a little bit under, not like Nick's. I would been nice if someone could check it out.

1 Answer

Steven Parker
Steven Parker
216,083 Points

Do you mean that the images only cover half of the background, where his covers it completely?

On line 20 of main.css you have restricted the image to 50% of the container size, where he uses 100%. But that's only part of the issue because his images are also wider. To fill the entire area you could use "width" instead of "max-width" to enlarge the images.

Also I noticed on line 126 you have "padding: 5;" instead of "padding: 5%;".

Sara Parker
Sara Parker
2,238 Points

Thank you, Steven!

I did what you told me, but still, the images will not cover completely. Can you see why?

https://w.trhou.se/5tbmvn30wd

Steven Parker
Steven Parker
216,083 Points

I was suggesting using "width" instead of "max-width" on the img rule, not the wrapper (the same line where the 100% went). Changing that on the wrapper prevents the dynamic resizing from working.