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 trial

CSS

Cant get rid of whitespace or center object

I dont know how to center text in the middle of an element(tried padding with no avail). Also, there is some white space above the header element that I cant get rid of(Margin is 0)

5 Answers

Could you please post your code.

h1 {

margin: 0 0 0 0;
background-color: #009933;
font-family: 'Passion One', sans-serif;
padding-left: 50% ;
margin: auto;

}

nav a {

    text-decoration: none;
    display: inline-block;

}

nav a.linkspace{

    margin: 12.5%; 

}

Im also trying to figure out how to add space between the nav links

I would try margin: 0 auto;

Space between the nav items can be done with margin and padding. Start out small and play around with the numbers so you get a feel for how things work. margin: 3px ; would put a margin of 3px around the entire element. Just play around with it and use the chrome developer tools. They really help to get a grasp on how different elements take up different kinds of space with margin and padding. Keep going, you are only 2 days into this. Good luck!

Thanks a lot!