position:fixed on my nav bar but it doesn’t work
Here’s my pen: https://codepen.io/CaptainHenry/pen/MWmgYxV
You have a stray backslash in your css. Remove that and add more content and you’ll see that it works.
Thanks but now I got another problem with the content. It got the nav bar cover some first line!
By positioning the header you removed it from the document flow. Now you need to create a space equal to the height of the header to push down your content.
Thanks for replying! And I try make a div wrap the header and put it to relative but it doesn’t work.
Try a div with height and width between the header and the content or top margin on the next element after the header.
Thanks it works great!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.