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

CSS

Nick Chaney
Nick Chaney
2,183 Points

Style the Portfolio: No margin between images

I'm basically following the tutorial step by step without any special modifications of my own. Everything has gone smooth until now. For some reason, there is not any margin between my images like it seems there is supposed to be. The background color, width, all that other stuff works great. Just no margins.

Here is my workspace: https://w.trhou.se/zt7prbj55k

Bogdan Cabaj
Bogdan Cabaj
16,348 Points

Please include your workspace. I can't find anything wrong with this section specifically and I looked at this page earlier today.

Nick Chaney
Nick Chaney
2,183 Points

Bogdan,

Thanks for that link, I had tried to use the "markdown cheatsheet" but it appears to be broken. I did not realize it had that snapshot function. Very handy. I have updated my original question with my workspace.

1 Answer

Bogdan Cabaj
Bogdan Cabaj
16,348 Points

Found two issues:

#gallery li {
  float: left;
  width: 45%;
  margin: 2.5%; /* no colon after margin - this fixes margin issue*/
  background-color: #f5f5f5;
  color: #bdc3c7; /* no # symbol before hex color */
}

Additional issue

footer {
  font-size: 0.75em;
  text-align: center;
  clear: both;
  padding-top: 50px; /* missing colon after padding-top */
  color: #ccc;
}

I found those issues with help of developer tools in chrome and looking at your css.

You can always use these websites to validate your CSS and HTML.

Nick Chaney
Nick Chaney
2,183 Points

You are a king among men. Thank you so much. It's crazy how such a small oversight can cause such silly problems. I went over and over the code too and I simply didn't notice my omissions. Those two sites you linked are very handy, thanks so much. I appreciate your help!