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

Rob Wood
Rob Wood
11,089 Points

Keeping <li> images the same size

Hi guys,

I think this is probably a very basic question, so apologies in advance! I've started on the front-end web dev track and have completed the build a basic portfolio section, and now the Lake Tahoe CSS redesign.

For practise, I wanted to remove one of the placeholder portfolio images we use on the course, put my own in its place and link it to my Lake Tahoe project. So, I've knocked up a quick image in Photoshop and put that in, but it's displaying as slightly bigger than the other images we put in.

You can see what I mean on my website; http://codedbyrob.in

I was hoping the responsive styling we put in place on the course would resize it down to the same size as the others. As it hasn't, is there any way I can do this in code?

I wasn't sure the best way to show you the relevant code, so I've created a GitHub and uploaded my portfolio homepage, the css styling and responsive css doc. Link is https://github.com/codedbyrob/portfolio.git

Thanks so much for your help

Rob

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Rob,

I think it has to do with actual image size. The example pictures used in the course are 1024 x 768 @ 72 pixels/inch. When I inspect your image, it is 400 x 400. If you go back to Photoshop and make the image the same dimensions, it should show up the same on the web page as all the images do have the same styling.

Give that a try. :dizzy:

Rob Wood
Rob Wood
11,089 Points

Hey Jason,

Brilliant, that's worked. Thank you very much :-)