4

A question on the CSS position property. I have a hard time understanding position, so I thought I would finally conquer it so that website development it easier.

Q.) Absolute removes the content from the flow and bases its position on the body, unless a container in the body has absolute, meaning the lowest level element finds the highest element that has absolute and bases its position from that and relative keeps it flow as if it was still there and moves relative to is current position in the documents as just a visual, as it does not move the other elements. Am I getting that correct?

Comments
  • 1
    That's a really long question but I think you got it if I read it correctly.
  • 2
    It follows the parent body, so if it’s inside a position relative div, then the absolute element will follow from that
  • 1
    @devTea I got an answer from somewhere else, I forgot that absolute removes the div from the document flow.

    So, I figured out that if the parent is relative, it will keep its flow, and the element inside it is absolute, the element will be absolute relative to the parent.
Add Comment