Retroactively applying skills learned

Hi there folks,

I’m in the process of adding some of the things i’ve learned recently to an ongoing project that involves my gaming hobby. Does anyone have any insight in terms of what code can be used in CSS to clear the gap between the navigation bar and the top of the page. Please see attached photo for query.


Usually when something like this happens it’s because of the default padding/margin. So all you need to do is add a rule that affects all of your visible HTML, essentially making a new default for those properties. Normally this can be fixed by adding something like this to your css file:

body {
    margin: 0;
    padding: 0;

If that doesn’t fix it, let me know!

You may also want to include a reset on the box-sizing on all elements and pseudo-elements:

*::after {
  box-sizing: border-box;
1 Like

Hey sorry for the late response, this did in fact fix my problem!

Thank you for your help.

1 Like

Of course! You can mark this topic as solved by marking my previous reply as the solution (I believe you can mark j-neff’s comment as an additional solution, too, if you’d like!)