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 How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Liam George
Liam George
12,004 Points

Why 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.

Liam George
Liam George
12,004 Points

I fixed it! Thanks guys

2 Answers

if 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
Daniel Čupak
6,602 Points

show us your code please