How to turn off the relative positioning of an element in CSS?

Published March 3, 2021

To turn off the relative positioning of an element in CSS, you can set the position property of that element to static, this will attach that element back to the whole document flow.

/* Turn off relative positioning */
position: static;
  • This is useful in the cases where we want to revert the positioning of an element used with position: absolute; property back to its original document flow.

Feel free to share if you found this useful 😃.


Share on: Facebook Twitter