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 How to Make a Website Styling Web Pages and Navigation Build Navigation with Unordered Lists

Abhijeet Das
PLUS
Abhijeet Das
Courses Plus Student 3,158 Points

hello Please help me I am in how to make a website track and I can't rid off the white gap on the top of my header.

hello Please help me I am in how to make a website track and I can't rid off the white gap on the top of my header. I use same css rule on my header selector as Nick shows in his lesson. Please suggestions

Hi Abhijit,

What does your html look like right now?

See this thread for how to post code: https://teamtreehouse.com/forum/posting-code-to-the-forum

5 Answers

Abhijeet Das
PLUS
Abhijeet Das
Courses Plus Student 3,158 Points

Hello Andreas Negative 15 px solve the problem however I dont know what is the problem with my CSS. Thank you. Please can you tell me where could I able to download Nick's CSS code on how to make a website. Thank You.

Can you please post some Code? Tip: You can also compare your code with the one of Nick(Download Section) at diffchecker.com.

Abhijeet Das
Abhijeet Das
Courses Plus Student 3,158 Points

here is my css code

/*** HEADER STYLE***/

header { background-color: #198A19; float:left; margin:0 0 30px 0; padding:5px 0 0 0; width:100%; }

h1, h3 { color:#fff;

}

h1 { font-family:'Ubuntu', sans-serif; font-size: 1.75em; margin: 15px 0; font-weight: normal; line-height: 1em; }

h3 { font-size: 1em; font-weight: normal; margin: -10px 0 0; }

Philip Cox
Philip Cox
14,818 Points

Try adding a no margin in your CSS.

h1 {
 margin-top: 0;
}

Or, try adding some padding to your heading, that can remove white space weirdly enough. Either way, it's probably your h1 doing it.

Abhijeet Das
Abhijeet Das
Courses Plus Student 3,158 Points

here is my code little bit different from Nick shows however everything works perfect except the problem

/*** HEADER STYLE***/

header { background-color: #198A19; float:left; margin:0 0 30px 0; padding:5px 0 0 0; width:100%; }

h1, h3 { color:#fff;

}

h1 { font-family:'Ubuntu', sans-serif; font-size: 1.75em; margin: 15px 0; font-weight: normal; line-height: 1em; }

h3 { font-size: 1em; font-weight: normal; margin: -10px 0 0; }

try a negative margin on the header

``css

header { background-color: #198A19; float:left; margin:-5px 0 30px 0; padding:5px 0 0 0; width:100%; }

Hi Abhijit

at the bottom click on the Downloads tab and download the project files.

Hello,

I was having the same issue. I removed margin and padding from my h3 element and it fixed the problem.