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 CSS Layout Techniques Display Modes Display Modes Challenge

Mohammed Asif Anwar
Mohammed Asif Anwar
5,380 Points

about the main-header

.main-header 5px of padding on each side.

7 Answers

It's better in this case to use the shorthand padding property. when you give it a single value then it applies that to all 4 padding values.

.main-header {
  padding: 5px;
}

The problem with yours is that you left off padding-left

Also, css isn't case sensitive but I would recommend the consistent use of all lower case letters.

padding-top rather than Padding-top

Mixing the case could get you into trouble with class and id selectors because class and id's in html are case sensitive.

What's your question?

Mohammed Asif Anwar
Mohammed Asif Anwar
5,380 Points

I just did what is says but it's keep saying

Make sure you are giving .main-header 5px of padding on each side. I don't know if I am doing the coding wrong ..

I would check simple syntax errors. You probably have already done that, but that's usually the case if you feel so strongly that your right.

Mohammed Asif Anwar
Mohammed Asif Anwar
5,380 Points

Can you write me the coding for this question so I can compare what I was doing wrong?

Hi Mohammed,

If you post your code that you've tried then someone can point out what you might be doing wrong.

Mohammed Asif Anwar
Mohammed Asif Anwar
5,380 Points

What I did .main-header { Padding-top: 5px; Padding-right: 5px; Padding-bottom: 5px; }

Did you mix up class and id. You might want to check which one you're using.