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 trialMatthew Clark
7,255 PointsTask 1 of 4
I am quite confused on how to do this task. Below is the code I am trying to use.
nav ul { margin: 0 10px 0 10px; }
2 Answers
Jason Anello
Courses Plus Student 94,610 PointsI just pasted your css into the code challenge and it passes.
Riley Hilliard
Courses Plus Student 17,771 PointsWhile what you wrote will technically work, it can be refactored to be shorter. A hint would be to look at the repeating numbers you have, which are specifying the margin of each side: top, right, bottom, left. You can actually set all of these with just 2 sets of parameters. So it would look something more like this:
/* Your format */
nav ul { margin: X X X X; }
/* Correct (Refactored) Format */
nav ul { margin: X X; }
Jason Anello
Courses Plus Student 94,610 PointsHi Riley,
You might want to update your example to use X and Y. It's impossible to know where the 0 and 10px would go for somebody that didn't already know about this.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsMaybe try refreshing the page.