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 How to Make a Website Styling Web Pages and Navigation Make a CSS Image Gallery

Saman Rajaei
Saman Rajaei
1,326 Points

whats wrong in here? or maybe i don't understand the question

what does it mean to remove the bullet points? or it gives me an error about the margin i don't know how to fix,please help me out

css/main.css
a {
  text-decoration: none;
}

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

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

h1, h2 {
  color: #fff;
}

nav a {
  color: #fff;
}

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

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

img {
  max-width:100%
}

#gallery li {
  float:left;
  margin:0 0;
  padding:0
}

2 Answers

Craig Schlegel
Craig Schlegel
12,268 Points

It would be helpful if you posted more about your problem but based on the information you included, I think you need to select the unordered list and add the style "list-style-type: none;

Something like:

#gallery ul {
list-style-type: none;
}

As for the margin problem, the margin property can affect your output in a few different ways. If you have one number assigned to the "margin" property then that will be the margin for the top, right, bottom, and left of whatever element you selected. If you have two numbers assigned the first will affect the top and bottom margins and the second number affects the left and right margins (ex. margin: 10px, 0;). If you have 4 numbers assigned, it affects the margins in this order- margin: top, right, bottom, left; If you have a value other than "0" assigned you need to include units like px or a % (ex. margin: 10px;) I hope this helps.

In the Challenge on Task 2, it asks you to select the element with the ID of "gallery", but it doesn't need the li contained within gallery just yet. You are also missing a semicolon after the padding property.

Task 2 should just be:

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

Task 3 then asks you to left float the list items contained with gallery and set their width to 45%. This means creating a new selector for the list items separate from the "#gallery" selector.

Task 4 asks you to set a margin of 2.5% to the list items and set the text color and background color to colors of your choosing. This means you have to use that "#gallery li" selector we just created.

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Marcus,

Glad your helping out a student in need, but the best way to help is by giving an explanation if possible. Giving a answer is okay too, but giving the answer to challenges that the student has not even gotten to really isn't going to help anyone learn.

Thanks again, but a little too much information this time.

Well, those declarations I posted were not separate challenges but rather separate tasks in the same challenge. I could tell by the code he pasted that he was at least on the 3rd task. The 4th task might have been a bit much, but I did leave explanations. And if you're going to edit my comment, at least take out the code blocks instead of just putting edit. It makes no sense to leave the code block there but have edit inside of it.