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

JavaScript Treehouse Club: JavaScript Car Sounds Background Color, Margin, and Padding

David Rios
David Rios
1,183 Points

Need someone to take a look at this - Quiz says to change the padding of the links to 10px

....so i change the padding of the links to 10px and this is how i'm doing it:

/* Links */ a { background: transparent; border: 0; display: block; float: left; margin: 0; outline: 0; padding: 10px;} width: 33%; }

but it keeps saying i'm wrong and that i'm not following the CSS rule - please help!

3 Answers

Dan Weru
Dan Weru
47,649 Points

Hi your code should be as follows

a { 
  background: transparent; 
  border: 0;
  display: block; 
  float: left; 
  margin: 0; 
  outline: 0; 
  padding: 10px;
  width: 33%; 
}

Remove the extra } that’s immediately after padding:10px; in you code

dragos busuioc
dragos busuioc
24,908 Points

why did you put curly braces after padding?the rule is ending after witdth

David Rios
David Rios
1,183 Points

Hi Guys! Thanks for your responses - I knew I shouldn't have been adding the curlys after the padding but in a previous quiz it kept saying i was wrong until I put the curly - Example: "Change the margin to 40px auto" so I changed it and it said that I needed to add a curly.

so I changed it to 40px auto;} and it passed me.