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

already done it.. nothin happen.. il l watch the videos again...

where can i find the dev tools?

OK Ok.. thank Jeremy Canela

Kevin Faust
Kevin Faust
15,353 Points

try adding 1px of padding to the body. i remember doing that a few months ago..not sure if im right

Jenny Veens
Jenny Veens
10,896 Points

Hi 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
Max Kutner
7,595 Points

Make 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
Aaron HARPT
19,845 Points

If you are using inline block displays, you may try using a negative margin. Post your code?

Set the margin-top of h1 with the value 0 or try to use a margin-top property with negative value.