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 trial7 Answers
Jason Anello
Courses Plus Student 94,610 PointsIt'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
Tristan Gaebler
6,204 PointsWhat's your question?
Mohammed Asif Anwar
5,380 PointsI 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 ..
Tristan Gaebler
6,204 PointsI 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
5,380 PointsCan you write me the coding for this question so I can compare what I was doing wrong?
Jason Anello
Courses Plus Student 94,610 PointsHi Mohammed,
If you post your code that you've tried then someone can point out what you might be doing wrong.
Mohammed Asif Anwar
5,380 PointsWhat I did .main-header { Padding-top: 5px; Padding-right: 5px; Padding-bottom: 5px; }
Tristan Gaebler
6,204 PointsDid you mix up class and id. You might want to check which one you're using.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsAlso, css isn't case sensitive but I would recommend the consistent use of all lower case letters.
padding-top
rather thanPadding-top
Mixing the case could get you into trouble with class and id selectors because class and id's in html are case sensitive.