Skip to content

Gap of Header Component in fixed Position can't be resolved with CSS reset #150

Answered by NikRoe
StefanieLoeser asked this question in Web
Discussion options

You must be logged in to vote

Hey Stefanie,
it looks like your styled component Head is missing a property. By adding top: 0; as another CSS property your headline should behave as intended :)

On another note, I would advise renaming the component to something other than Head, since Next.js provides us with an identically named component. This might lead to confusion.
For more information on the Head component from Next.js, see this link

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NikRoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Web
Labels
2 participants