Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Styling Web Pages and Navigation Create a Horizontal List of Links

Front-end Stage 6 (Styling Web Pages and Navigation)

Stuck on task 4. I'm not able to set the padding for the links inside the nav.

I think I've selected the relevant element (nav a) but my updates are not accepted. I get the feeling that I've made a very silly error somewhere...

Thanks!

5 Answers

you don't need the comma between the padding values, so it should be...

padding: 15px 10px;

cheers

Hey James

Can you add your code, so we can see what is happening?

cheers

Sorry! Just realized that I left that out.

Instructions: "Select the links inside the nav element and set their font weight to 800. Then, set padding on the top and bottom to 15 pixels. Set the padding on the left and right to 10 pixels."

Relevant piece of code (I think):

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

Well, my prediction about the silly error was correct! Thanks for your help, Matt.

This was my first question in the forum. Can you explain how to correctly post examples of our code? After looking through a few posts, I see that most others are doing something differently.

No problem James. If you click the Markdown cheatsheet below the text area, it gives you some examples...

But a quick example is below...

Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.

.someClass {
  color: red;
  margin: 10px 5px;
}

cheers

Excellent. Thanks again!