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 trialOto Hlincik
4,852 PointsNot sure what's needed for the first assignment
I am trying to complete the first assignment. The task states that the .main-header needs padding of 5px added on either side. When I write the following CSS: .main-heading { padding-right: 5px; padding-left: 5px } and submit I get back a message that I need to make sure to add padding of 5px on each side of the .main-header.
I am super confused. What am I doing wrong?
2 Answers
by4
34 PointsJust two issues here:
- There's a typo in your class name. It should be .main-header and not .main-heading.
- When they say "each side", it apparently means on every side. Your code should look like the code below.
.main-header { padding: 5px; }
Oto Hlincik
4,852 PointsAlright. I figured out what needed to be done but the task should be probably rephrased. I was able to complete the first assignment by submitting the following: .main-header { padding: 5px }
I don't think that this addresses the 'add padding of 5px on each side' directive. The task should be probably rephrased to 'add padding of 5px to the .main-header element'.
by4
34 PointsYou got to it before I did - that works! I agree the task should be rephrased. It's a bit confusing with the current wording.
Jeff Busch
19,287 PointsHi Oto,
The correct code you entered adds padding to all four sides. The top side, the right side, the bottom side, and the left side.
Jeff
Oto Hlincik
4,852 PointsOto Hlincik
4,852 PointsThanks Bailey,
I made the typo in the initial post but had the class correct when it was not working. I think that the issue was with the wording of the quiz question. 'add padding of 5px on each side' sounds like the padding needs to be added to the left and right side. Top and bottom are technically not sides ;-)