An element with position: ________ is positioned based on the viewport and stays fixed when scrolling.

  • static
  • relative
  • absolute
  • fixed
The correct option is fixed. When an element has a position: fixed, it is positioned relative to the viewport and remains fixed in its position even when the user scrolls the page.
Add your answer
Loading...

Leave a comment

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