javascriptperformancedombrowserreflow

Does the browser's render reflow if element's position is absolute?


If I have an element with an absolute position and I change its left and top position will reflow to its parent children? And what about its own children if they are not affected as they are also absolute positioned by left and top axis?

If I change an element's width/height but have no importance in the parent and in its children?


Solution

  • An object with absolute position does not affect the layout of the page. The page is laid out without regard for an absolute positioned object. Moving the absolute positioned object does not cause any reflow of other objects.

    Moving an object with absolute positioning will cause its child objects to move along with it. It will not reflow them, they will just move along with their parent container.