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 trialMarguerite Holden
6,075 PointsAdd CSS that will allow all images to fill their parent element.
I put:
img { max-width: 45%; }
2 Answers
Steven Parker
229,644 PointsYou forgot to provide a link to the actual challenge, but...
...a max-width
of less than 100% would guarantee that the element will not fill its parent.
casthrademosthene
6,274 PointsI don't understand what the question is asking me to do
Steven Parker
229,644 PointsThe correct property is max-width, since it says allow it to fill, not require it to fill. But to allow the element to completely fill the parent, it must be 100%.
img {
max-width: 100%;
}