Positioning

suggest change

Syntax

Parameters

Parameter | Details | —— | —— | static | Default value. Elements render in order, as they appear in the document flow. The top, right, bottom, left and z-index properties do not apply. | relative | The element is positioned relative to its normal position, so left:20px adds 20 pixels to the element’s LEFT position| fixed | The element is positioned relative to the browser window| absolute | The element is positioned relative to its first positioned (not static) ancestor element| initial | Sets this property to its default value.| inherit | Inherits this property from its parent element.| sticky | Experimental feature. It behaves like position: static within its parent until a given offset threshold is reached, then it acts as position: fixed.| unset | Combination of initial and inherit. More info here. |

Remarks

Normal Flow is the flow of elements if the position of element is static.

  1. defining width is beneficial because in some cases it prevents overlapping of element’s content.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents