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 triallinzhang5
2,398 PointsHi I have a question about the position of the h1"Nick Pettit". If I want to move h1 a little bit down, how to edit CSS?
Hi, I am pretty new to coding and have a basic question about the position of the h1 "Nick Pettit"in this case. I just found the name "Nick Pettit" placed so high on the web so I was wondering If I want to move h1 a little bit down on the page, how to edit CSS? Thank you so much for your help!!!
2 Answers
Erik Nuber
20,629 Pointsh1 {
padding-top: 2px;
}
you could also use margin-top depending on what you are trying to accomplish.
Erik Nuber
20,629 PointsSure...
padding: top right bottom left;
This is the order for both margin and padding. It starts at the top and works around clockwise.
padding: 10px 5px;
This would set both the top and bottom to 10px and right and left to 5px
padding: 10px 5px 0px;
This would set top to 10px right and left to 5px and bottom to 0 px
so you can choose to use the short hand for padding or use padding-top, padding-bottom, padding-left, padding-right.
linzhang5
2,398 Pointslinzhang5
2,398 PointsHi Erik, thanks a lot! Your answer is so helpful! Just one more question about the padding property. Since only the padding-top is given with value here, what are the values of the other three paddings in default? padding-right, padding-left and padding-bottom?