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.

HTML How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Brice Schultz
Brice Schultz
3,966 Points

Images overlap. My Images in the gallery are completely overlapping with no separation between them.

My Images are overlapping completely and have no separation between them. I'm assuming this is a problem in my gallery html or Gallery selector in my CSS

Example of my HTML: <ul id="gallery"> <li> <a href="IMG/numbers-01.jpg"> <img src="IMG/numbers-01.jpg" alt=""> <p>Experimentation with Color and Texture.</p> </a> </li> <li> <a href="IMG/numbers-02.jpg"> <img src="IMG/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li> <li>

Example of the CSS:

gallery {

margin: 0; padding: 0; list-style: none; }

gallery li {

float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7; }

Brice Schultz
Brice Schultz
3,966 Points

Disregard this there was a typo in my code that I found.

Brice Schultz
Brice Schultz
3,966 Points

Disregard this there was a typo in my code that I found.

Kailash Seshadri
Kailash Seshadri
3,060 Points

Helo Bruce The width of your gallery li is 45%, so you can fit 2 images and a margin of 2.5% between them so, (2.5*3)+(2*45)= 97.5%, so try changing the margin as follows:

gallery li { width:45%; margin:3.333%; }