HTML element positioning works in many ways
• Order in the source code
• CSS Flex
• CSS grid
• CSS position
There is: position: relative; absolute; fixed;
The position: relative property; positions the element relative to the current position.
The position: absolute; positions the element absolutely to the last relatively positioned element. If there is no relatively positioned element, it is positioned absolutely to the body.
The position: fixed; positions the element absolutely to the body. If you move the website, the element always remains fixed and does not move.