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

Stefan Mach
Stefan Mach
3,691 Points

4th question flawed

can someone correct the test file so that when I type

padding: 15px 10px;

it knows I have set the top padding to 15px?

my current code has top, right, bottom, and left broken out which I know I do not need to do but I was trying to see if it would recognize I had done it correctly. It did not.

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;
}

nav ul {
  margin: 0 10px;
  list-style: none;
  padding: 0;
}

nav li {
  display: inline-block;
  font-weight: 800;
  padding: 15px 10px 15px 10px;
}

Hi Stefan,

Are you saying that this -

padding: 15px 10px;

produces something different to this? -

padding: 15px 10px 15px 10px;
Stefan Mach
Stefan Mach
3,691 Points

no. What I am saying is that I did not want to get distracted by someone mentioning the way I had coded it. Mission fail. I am saying that coding it either way gets a "bummer", top should be set to 15px. Is the code above correct if the goal is to set the top to 15px? If it is, then the program is making a mistake in saying I am wrong and needs to be corrected.

No problem,

I wasn't aware you were doing a code challenge. Perhaps there is an error as your code should be fine. You might need to just specify the padding-top -

padding-top: 15px;

4 Answers

Stefan Mach
Stefan Mach
3,691 Points

The code challenge is to set top and bottom padding to 15 px and left and right to 10px.

I typed: padding: 15px 10px;

The code challenge says it is wrong. Am I then correct in believing the code challenge is flawed and should be corrected? I cannot complete the section because of this and so had to just move on.

Hi Stefan,

Sounds like there is a problem then and you should get in touch with support to let them know -

http://teamtreehouse.com/support

All the best,

Ede

Stefan Mach
Stefan Mach
3,691 Points

Thank You. I have yet another problem in that everytime I try the next code challenge there are communication errors so I cannot complete the course. Oh well.

Stefan

Hmm, switch browsers? Apparently chrome works the best.

Good luck

Stefan Mach
Stefan Mach
3,691 Points

Last time I put chrome on my system malware piggybacked it in and immediately locked up my system with a flashing screen and a number to call for service, which was all a scam. No thanks to Chrome. If the system can't work with what I have, which it has up until now, then I guess I won't be able to use it.