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 trialLiam George
12,004 PointsWhy isn't resize working?
After applying all of the CSS, the images stretch. The width of the photo works as it should, but the height is much larger, meaning the images are distorted. They don't resize in perfect ratio like in the video. I've been using Coda 2 and Safari for this exercise.
2 Answers
Micheal Allen
19,311 Pointsif your trying to maintain ratio for an image, try this:
img{
height: auto;
width: 100%;
}
It's difficult to know exactly how to help without a preview of your code, I hope this helps your issue though.
Daniel Čupak
6,602 Pointsshow us your code please
Liam George
12,004 PointsLiam George
12,004 PointsI fixed it! Thanks guys