May 17th 2015

CSS Positions : static

What is Position Static, when should I use it and how?

What is Position Static?

position: static;
This is the default position that is applied to all elements, unless you specify otherwise. In fact, you don't even need to type the line above, unless your element has some other position value and you need to overwrite it.

When should I use this?
Use it when everything just works by default and you don't need any special positional behavior.

Tell me more

  • When an element is positioned statically it follows the flow of the page meaning it will behave like a regular paragraph. It will follow its previous sibling and will be followed by its next.
  • You do NOT have access to Top, Right, Bottom, Left properties when you use this option.
  • You can't use z-index. I mean you can, but it will be ignored by the browser.

Next stop is Position Relative. Check it out!