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 trialAbhijeet Das
Courses Plus Student 3,158 Pointshello 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
Jason Anello
Courses Plus Student 94,610 PointsHi 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
Courses Plus Student 3,158 PointsHello 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.
Philip G
14,600 PointsCan you please post some Code? Tip: You can also compare your code with the one of Nick(Download Section) at diffchecker.com.
Abhijeet Das
Courses Plus Student 3,158 Pointshere 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
14,818 PointsTry 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
Courses Plus Student 3,158 Pointshere 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; }
Andreas cormack
Python Web Development Techdegree Graduate 33,011 Pointstry 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%; }
Andreas cormack
Python Web Development Techdegree Graduate 33,011 PointsHi Abhijit
at the bottom click on the Downloads tab and download the project files.
Liz Laffitte
23,691 PointsHello,
I was having the same issue. I removed margin and padding from my h3 element and it fixed the problem.
Abhijeet Das
Courses Plus Student 3,158 PointsAbhijeet Das
Courses Plus Student 3,158 Pointsthank you for quick reply