Force “position: absolute” to be relative to the document and not the parent container

You’re looking for position: fixed.

From MDN:

Fixed positioning is similar to absolute positioning, with the exception that the element’s containing block is the viewport. This is often used to create a floating element that stays in the same position even after scrolling the page.

Notice it doesn’t work when…

(…) one of its ancestors has a transform, perspective, or filter property set to something other than none.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)