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 Create a Horizontal List of Links

claire gardiner
claire gardiner
553 Points

anyone else struggling with the task in stage 6? i dont seem to have the right code pre-loaded?

Im in stage 6 and its asking me to complete the code challenge by removing the margin on the unordered list... but there is no unordered list in the code in the first place...

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 {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

6 Answers

Garrett Petticrew
Garrett Petticrew
7,242 Points

Hey Claire!

Good question, and I agree that this particular code challenge could be worded a little bit better.

The challenge is not asking you to modify CSS that has been pre-written. It is asking you to add new CSS that targets the Unordered List of the Nav section.

Then, once you've added the new CSS selectors that directly target the ul within the nav, it is asking you to remove the top/bottom margins and modify the left/right margins with new css.

I think you can handle the challenge from here, but let me know if you need further assistance.

Happy coding.

Jonathan Sebastiao
Jonathan Sebastiao
14,271 Points

The challenge is asking you remove the unordered list margins from the nav. You have to write the code in that is why you aren't seeing it. It wants you to remove the margin from top and bottom while giving 10px to the left and right.

margin: top right bottom left

would be the order the code goes in

nav ul {
margin: 0 10px 0 10px; 
}
claire gardiner
claire gardiner
553 Points

:D thanks for your speedy response Jonathan!

claire gardiner
claire gardiner
553 Points

it seems as though every time i go to do the new challenge, though, its not carrying over any of the new code i wrote in on the last challenge? is this normal? so, because each time i do a challene it is so far behind im just copying and pasting my whole workspace over.... meaning i dont need to do the challenge... but i'd like to be doing them properly to test myself!

Garrett Petticrew
Garrett Petticrew
7,242 Points

If you are referring to the various steps within a challenge, then yes it should carry over between steps. I just tested this and it seems to be working.

If you are referring to code transferring over between individual challenges that are spread throughout a course, then no the code should typically not transfer, and that is by design.

You shouldn't need code from one challenge later on in the course to complete another challenge.

Does this help?

Jonathan Sebastiao
Jonathan Sebastiao
14,271 Points

You aren't suppose to remove the code you previously wrote. If you remove the code it will say the previous task isn't working any longer. You must only add on to the code. You may always reCheck work without having to go to the previous step.

Garrett Petticrew
Garrett Petticrew
7,242 Points

Oh wow, the forums section has ramped up in response speed.

Good job community!