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 trialTumayi Comfort Nyamakura
1,515 PointsAdd CSS that will allow all images to fill their parent element
Am completely clueless
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
h1, h2 {
color: #fff;
}
nav a {
color: #fff;
}
nav a:hover {
color: #32673f;
}
h1 {
font-family: Changa One, sans-serif;
font-size: 1.75em;
font-weight: normal;
}
img {
maximum-width:100%;
}
5 Answers
Justin Horner
Treehouse Guest TeacherHello Tumayi,
You're close! You have the right idea, but the CSS property is called max-width.
img {
max-width: 100%;
}
I hope this helps.
Tumayi Comfort Nyamakura
1,515 Points" Bummer! It doesn't look like you set the maximum width on images yet."This is the response I got
Justin Horner
Treehouse Guest TeacherI just tested this and I'm able to pass the first step of the challenge. Which step are you on? Also, make sure that you're adding the code I provided at the end of the css file.
Tumayi Comfort Nyamakura
1,515 PointsThat is exactly what I did.
Tumayi Comfort Nyamakura
1,515 Pointsa { text-decoration: none; }
wrapper {
max-width: 940px; margin: 0 auto; }
logo {
text-align: center; margin: 0; }
h1, h2 { color: #fff; }
nav a { color: #fff; }
nav a:hover { color: #32673f; }
h1 { font-family: 'Changa One', sans-serif; font-size: 1.75em; font-weight: normal; } img { max- width:100%; }
Justin Horner
Treehouse Guest TeacherAh, I think the issue is that there's an extra space between "max-" and "width". Remove that space so that it reads "max-width".
Tumayi Comfort Nyamakura
1,515 PointsThanks for your help and patience Justin I finally aced it
Justin Horner
Treehouse Guest TeacherYou're welcome!