Why is there space between my navbar and section?

Why is there a bar of space between the navbar and my first section? Is there something inherent about those elements that inherently includes a break?


The ul element (that you have in navbar) and the h1 element from the section both have an inherent margin property. Put it both to 0 and your navbar and section will touch each other. Hope this helps and good luck! :slight_smile:

1 Like

The default CSS values are being applied for the ul, p, h1 and h2 tags. And in those default values the margin property is the reason for the space between your section and navbar. You can overwrite those properties and set it to 0px for this to get resolved.

For more information on default CSS values for HTML elements, refer this link.
Default CSS values for all HTML elements

Good luck!

1 Like