Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Adding Pages to a Website Style New Pages

Daniel Hunter
Daniel Hunter
7,349 Points

Margin 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:

http://port-80-8r89lhxyvj.treehouse-app.com/about.html

on3iro
on3iro
12,644 Points

It'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.

John Lomax
John Lomax
1,117 Points

This 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

Hey 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
Daniel Hunter
7,349 Points

Yeah 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.

You 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
Daniel Hunter
7,349 Points

Got it, thanks again!