Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Larry Young
Larry Young
4,212 Points

Why are two images behaving differently in same div ul?

I don't know why but the first image and the last image of the ul #gallery are behaving differently. One picture has the width I want and one doesn't but they are both the same height. I went into GIMP and tried to set the images to the same height but it doesn't do anything. Again, the height looks right. Also the customtreehouselogo is responsive to the browser but the first image fadetree is not responsive. Any ideas. Hopefully it's something obvious I overlooked.

<div id="wrapper"> <section> <ul id="gallery"> <li> <a href="img/fadetree.png"> <img src="img/fadetree.png"> <p>Graphic with Fade</p> </li> <li> <a href="img/img/numbers-02.jpg"> <img src="img/img/numbers-02.jpg"> <p>Test Photo</p> </li> <li> <a href="img/img/numbers-06.jpg"> <img src="img/img/numbers-06.jpg"> <p>Test Photo</p> </li> <li> <a href="img/img/numbers-09.jpg"> <img src="img/img/numbers-09.jpg"> <p>Test Photo</p> </li> <li> <a href="img/customtreehouselogo.png"> <img src="img/customtreehouselogo.png"> <p>Test Photo</p> </li> </ul> </section> <footer> <img src="img/img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"> <img src="img/img/facebook-wrap.png" alt"Facebook Logo" class="social-icon"> <p>© 2016 Larry Young</p> </footer> </div>

2 Answers

this is really hard to read. Can you post a screen shot of the actual code? minified like this makes it very difficult.

Larry Young
Larry Young
4,212 Points

How do I post a screenshot on this forum haha sorry

Here is a codepen http://codepen.io/L89471/pen/OXQmEj

it appears to be working right on codepen. Did you look at the actual size in px of your images. You may need to adjust them using imaging editing software. You have both png and jpg which you should be able to easily adjust the actual size. this should allow you so more aptly set the resolution.

the #gallery li width and padding add up.

also there is an nth child method you can use in CSS to adjust 1 or a set of items without adjust all of them. I believe it is in one of the videos for this lesson. I do remember going over it. great tool to be even more selective without having to give each and every item its own class or id.

http://www.w3schools.com/cssref/sel_nth-child.asp

check out this link.

I hope this helps. Let me know if it does.