coffee
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
no problem
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
great 👍
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
(hopefully lol)
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
well, we learn something new everyday :D
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
and when you start scrolling, and you get to the amount of pixels specified in the
top
property, that's when the other stuff starts going underneath the header20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
this means that the elements below the header will still know that the header is there
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
sticky does the same job without taking the element out of the flow of the html
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
cool, so do position: sticky
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
i don't remember if it has to be the height of the header or not, but i think top: 0 should do the trick
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
or actually, play around with the top lol
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
and you can also add
top: 0
20 replies
KPCKevin Powell - Community
•Created by siuuu on 12/4/2023 in #front-end
positioning confusion
Try
position: sticky;
instead of fixed20 replies