Hi There! I would like to have this navbar be sticky to the top but when I set its position to this, I get this info warning (see screenshot). Any idea why?
When you use sticky positioning, the element needs to be stuck ‘relative’ to another element. That would be the first parent element with relative positioning.
I guess your body element’s positioning isn’t set to relative, meaning the nav bar doesn’t know where to ‘stick’
you just need to define at what point from the top of the page do you want the element to be sticky. In this case I think you want 0. In some other cases, maybe you want it to be sticky after you've scrolled for 1rem or 2rem. It all depends.
Unfortunately you can't change the position of a body tag - its always static.