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

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
231,122 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
231,122 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.