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

syntax, hierarchy and teminology

my problem is with question #4 of this code challenge. It seems to be a fairly simple and straightforward question, however I seem yo be making a fundamental error. I know that syntax is everything, having cut my teeth in the days of DOS. For example, in the previous code challenge, an errant semi-colon where a colon should have been was my stumbling block. (SYNTAX error) This code is very easy to learn but hard to commit to memory. I have found that i can find answers by breaking down the question. EXAMPLE: "Select the list items in the un-ordered list within the nav element and set......." OK. I go to my CSS but dont see this rule so I simply create it via : nav ul li {}. However, in the past, the word "SELECT" in a code challenge question meant to 'append to an already existing rule. In this case the confusion arises being asked to edit/create (?) the anchor element in the navigation section of the CSS when a "nav a" rule already exsist containing only the "color" attribute. When appending the "margin" and "list-styyle" attribute to this already existing rule failed, I wasnt suprised. And wrote it of to the cascading nature of css. Being the vet of literally 1000's of batch files, I know how important these rules are. Or could my problem be terminology? Multiple views of the video adds no new information. Nick just says, " Im gonna scroll down to here and....." Be advised : Inm sure Im the problem here and not you. And please do not detect any sort of negative tone from this message. Im having an AWESOME experince here. Im just trying to help you help me. Michael Bowen dosmonger@juno.com

1 Answer

Rasmus Willemoes Paulsen
Rasmus Willemoes Paulsen
12,436 Points

Im not quite sure if you solved the question anyways, I went ahead and took the quiz again to provide you with the correct piece of code. So that you can compare :)

nav a {
  color: #fff;
  font-weight: 800;
  padding: 15px 10px 15px 10px;
}

nav ul {
  margin: 0px 10px 0px 10px;
  margin-top: 0px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom:0px;
  text-decoration: none;
  padding: 0px;
  display: inline-block;
}

nav li {
  display: inline-block;
}

I think those question were pretty easy to understand and solve :) I guess it comes down to personal preference in the end :)