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 trialNazrul Islam
1,010 Pointshow can i keep the picture vertically same size
i m using float but picture not showing in sa me size
Maddalena Menolascina
6,668 PointsI just went through the same issue. so we don't want to set height and width as we want the gallery to resize with the ul which resizes itself when the screen size changes (and the device), we need to stuck with a "percent size" rather than a pixels one. After ages I realized how silly I was: I was using the same code as the teacher but my own photos and photoshop was resizing them keeping a certain proportion between height and width, so I changed a setting in photoshop and I resized all of them in order to look all the same size, I saved my re-resized pictures and refreshed my working page and all of them were fitting properly. Little things but big troubles for us beginners ;)
1 Answer
Chad Thompson
2,705 PointsI think you are having the same issue I was. Look in the index.html and delete the height from each photo. I hope this solves any future problems.
Andreas Kullander
3,316 PointsAndreas Kullander
3,316 PointsFloats have no impact on the size of your image, it declares where it should position within it's container. I.e. float: left makes your element keep to the left within it's container div, for example. If you want to size your image, you should use width or height.