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
Louis Ross
845 PointsMy CSS Doesn't remove the white space at the top of my web page. Help? :(
I've done exactly what Nick told me and it's not worked I'm not sure if i've missed something i've tried moving things around it's doing nothing.
https://w.trhou.se/i4wckuzdxy my workspace
if anyone knows please explain to me what I did wrong?
Thanks,
Louis
8 Answers
Hector Castillo
2,620 PointsHi Louis,
I found the problem it's a simple syntax error. Take a look at your css and under the "HEADING" section go down to the "header" property you have and look at the name. You have a double colon after "header*(:)*" Just remove the double colon and your white space problem will be fixed.
/**************
HEADING
***************/
header: {
float: left;
margin: 0 0 30px 0;
padding: 5px 0 0 0;
width: 100%;
}
/**************
HEADING
***************/
header {
float: left;
margin: 0 0 30px 0;
padding: 5px 0 0 0;
width: 100%;
}
Jake Nisenboim
3,374 PointsYou may want to try closing and re-opening workspaces. Or alternatively not using workspaces at all. It causes a ton of issues because at times, it can take half an hour or more to make simple changes to your port.
Good luck and let me know if waiting / re-opening workspaces worked !
Louis Ross
845 PointsDone that twice and cleaned the browser history and cache.
Louis Ross
845 PointsDone that twice and cleaned the browser history and cache.
Jake Nisenboim
3,374 PointsI would download your workspaces, make a folder, copy the files from the project folder to the new one and upload it to an editor such as Atom by Github.
It might solve your problem, but regardless, will save you from recurring problems in the future.
Mario Moreno
3,081 PointsIt seems weird, but I have heard sometimes the body element has some margin, so in your css write as follows:
body{ margin: 0; }
Tell me if it worked
Jake Nisenboim
3,374 PointsHe has normalize.css so he shouldn't need to do that.
Mario Moreno
3,081 PointsYou are right, I already know that but It could be the problem. That was my case
Louis Ross
845 PointsHi Mario
Didn't work
Thanks for replying
Louis
Louis Ross
845 PointsHi Mario
Didn't work
Thanks for replying
Louis
Jake Nisenboim
3,374 PointsSomething unrelated, I am unsure if it will cause problems; I noticed that for all of your pictures you put
< img src="/img/....." alt"">
You only need
< img src="img/....." alt"">
In any case, I don't know if that might cause issues.
Luke Pettway
16,593 PointsI think you have a collapsing margin issue. Check your H1 at the top (the one with your name), if you take the margin off of it the issue goes away. You could make the <header> overflow: hidden or remove the margin from the top of the h1 and use padding on the header as well.
Louis Ross
845 PointsLouis Ross
845 PointsI'm actually embarrassed at how simple that was to fix!
Thank you so much!
Louis
Hector Castillo
2,620 PointsHector Castillo
2,620 PointsNot a problem, happy to help out!
Also don't be embarrassed, it's very common when it comes to coding. In fact I would say 85% of the time when we run into problems with our code is because of a syntax error. At least that's my experience anyways.