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!
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

mohammad bayazid arasa
4,513 PointsHOW TO get rid of the spaces located at the top of site.?
HOW TO get rid of the spaces located at the top of site.?
9 Answers

Jeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsTry this:
body {
margin: 0;
}

mohammad bayazid arasa
4,513 Pointsalready done it.. nothin happen.. il l watch the videos again...

Jeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsTry looking at the dev tools and see why there's space.

mohammad bayazid arasa
4,513 Pointswhere can i find the dev tools?

Jeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsRight click -> Inspect or F12 or Ctrl+Shift+I. That is for google chrome. I'm not sure if it's the same for other browsers.

mohammad bayazid arasa
4,513 PointsOK Ok.. thank Jeremy Canela

Kevin Faust
15,353 Pointstry adding 1px of padding to the body. i remember doing that a few months ago..not sure if im right

Jenny Veens
10,896 PointsHi Mohammad, This question is a little difficult to answer without actually seeing the code or the issue you're dealing with. It could be that an element on your page is pushing things down, or maybe try setting margin: 0 on the html and the body.
Max Kutner
7,595 PointsMake sure you have not declared any margin values for the html element itself. Browsers typically have default margin values so setting it to 0 there should get rid of any unwanted white space.
Ex: html { margin: 0; }
Best, Max

Aaron HARPT
19,845 PointsIf you are using inline block displays, you may try using a negative margin. Post your code?

Mohamed Ookiyo
22,714 PointsSet the margin-top of h1 with the value 0 or try to use a margin-top property with negative value.