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 trialDaniel Hunter
7,349 PointsMargin for Heading and top of <p> Section
Having trouble figuring out where to adding padding for my heading an the top of the paragraph sections of my pages:
John Lomax
1,117 PointsThis would make your website look more spaced out if you add this to your main.css file
h2 { padding: 0 0 20px 0; }
img.profile-photo { padding: 20px; }
for the heading present in your selection tag of your page target the h3 tag element in html by CSS.
this would be something like this:
h3 { padding: 10px 0 0 0; }
hope this helps
Regards John
2 Answers
Dustin Matlock
33,856 PointsHey Daniel, it looks like your just missing a value of 30px
for the margin.
header {
float: left;
margin: 0 0 30px 0;
padding: 5px 0 0 0;
width: 100%;
}
Daniel Hunter
7,349 PointsYeah this is what I was referring to thanks! Now, how do I had space between the main heading and the navigation? Right now it's bunched up together.
Dustin Matlock
33,856 PointsYou have an extra colon on your margin for the navigation:
nav {
text-align: center;
padding: 10px 0;
margin:: 20px 0 0; /* Remove extra colon */
}
Daniel Hunter
7,349 PointsGot it, thanks again!
on3iro
12,644 Pointson3iro
12,644 PointsIt's been a while that i have watched those videos - so just to clarify: What exactly do you want to achieve? Do you just want to know on thich Element you should apply padding? Because this really depends on the outcome you want to get.