How to get my header to stay fixed to the top when I scroll

Currently on the product landing page, I can’t for the life of me figure out how to get my header to stay at the top when I scroll. I tried everything and can’t get anything to work, suggestions? tia

https://codepen.io/ethan-reynolds/pen/MWjzmYo

You actually do not have any content in your header. You should try this on html:

<header id="header"> Header </header>

and this to your #header in your css:

#header {
position: fixed;
top: 10px;
text-align:center;
font-size:40px;
}

Hi there,

You misspelled “position”.

I have also been stuck for a loooong time when it was a misspelling :slight_smile:

:laughing: and that too

I think the problem is the closing </header> tag in the html is after the <form>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.