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 trialMuhammad Haris Khan
8,587 Pointswhitespace above heading is still there?
#wrap{
max-width: 940px;
margin: 0 auto;
}
header{
background: black;
float: left;
color:white;
margin: 0 0 30px 0;
padding: 10px 0 0 0;
width:100%;
}
hgroup{
text-align: center;
}
nav{
background: grey;
text-align: center;
}
nav ul{
list-style: none;
}
nav li{
display: inline-block;
}
a{
text-decoration: none;
}
Above is my CSS code, i do not know why the the white space above header is still there. I tried increasing the bottom margin and abov padding but nothing helps.
2 Answers
Jaco Burger
20,807 PointsHi Muhammed. Can it be that you have a H1,H2,H3 etc. tag inside your header element? Remember h tags has default margins. To overwrite that, do something like this.
h1 { margin: 0; }
Muhammad Haris Khan
8,587 PointsSorry it was a stupid mistake as usual, normalize.css was not properly placed . thanks for time jason
Muhammad Haris Khan
8,587 PointsMuhammad Haris Khan
8,587 PointsThanks Jaco, i tried making the h1 margin and padding too but its not working. Here is my HTML code if it may help::
Ralph John Brabante
Courses Plus Student 7,153 PointsRalph John Brabante
Courses Plus Student 7,153 PointsHah! Thanks Jason! I did to much I forgot I did added an h3 XD silly me thanks!