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.

Kristi Mingal
817 PointsI have two images side by side with no margin between them and no margin on the left. What am I doing wrong?
/************* PAGE PORTFOLIO *************/
gallery {
margin: 0; padding: 0; list-style: none; }
gallery li {
float: left; width: 45%; margin: 2.5% background-color: #f5f5f5; color: #bdc3c7; }
gallery li a p {
margin: 20px; padding: 15%; font-size: 0.75em; color: #bdc3c7; }
4 Answers

Kristi Mingal
817 PointsThank you JH it worked.

Anirudh Bathini
904 PointsI have The same Issue, I have the same code, i even have the semi-colon, still wont work. i dunno how to resolve this.
my code is far is
/******************************************** Page : Portfolio *********************************************/
gallery {
margin:0; padding:0; list-style:none; }
gallery li{
float:left; width: 45%; margin::2.5%; background-color:#f5f5f5; color: #bdc3c7; }

Anirudh Bathini
904 PointsI got it, Sorry! i had :: after the margin, corrected that, works now :)

Kristi Mingal
817 PointsGood that you got it fixed AB. Do you need to put a space between li and { ?

Anirudh Bathini
904 PointsNo I don't think you need spaces for brackets anywhere on the html or css docs, they work fine either way. It's just a preference of how you want your code to look , and i agree that it looks better with spaces. I usually make my code pretty once i have it working.
Jennifer Hughes
11,421 PointsJennifer Hughes
11,421 PointsA quick suggestion:
You are missing a semi-colon after the margin property. Give that a try.