When an element's position is absolute and no ancestors are positioned, it will be positioned relative to the ________.

  • Body
  • Document
  • Nearest positioned ancestor
  • Viewport
When an element's position is set to absolute and no ancestors are positioned (with relative, absolute, or fixed positioning), it is positioned relative to the viewport, which is the browser window. This means it's positioned in relation to the visible area of the web page.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *