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

HTML How to Make a Website Styling Web Pages and Navigation Make a CSS Image Gallery

Stacey Williams
Stacey Williams
2,361 Points

How do I add a margin of 2.5% to the gallery list item?

I keep getting an error that says to "Be sure to set the margin for the gallery list items to 2.5"%

a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

#logo {
  text-align: center;
  margin: 0;
}

h1, h2 {
  color: #fff;
}

img{
  max-width: 100%;
}

#gallery {
  padding: 0;
  margin: 0;
  list-style: none;
}

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%;
  background-color: green;
  color: white;

}
nav a {
  color: #fff;
}

nav a:hover {
  color: #32673f;
}

h1 {
  font-family: β€˜Changa One’, sans-serif;
  font-size: 1.75em;
  font-weight: normal;
}

2 Answers

Mike Dardano
Mike Dardano
2,256 Points

I believe this is a bug. Your code looks correct and many of us are also experiencing this issue at the moment.

Stacey Williams
Stacey Williams
2,361 Points

Okay, thanks! I thought it was a bug, but I wasn't sure.

Thank you for such a quick response.

We upgraded some of our infrastructure just a bit ago and accidentally it broke a couple of our challenges. We're fixing it up right now. Sorry for the frustration :'(

:zap: