HTML elements are positioned static by default A static positioned element is always positioned according to the normal flow of the page.
Paragraph with no position.
Paragraph with no position.
Paragraph with no position.
Paragraph with no position.
Paragraph with no position.
Paragraph with static position.
Static positioned elements are not affected by the top, bottom, left and right properties.
An element with a fixed position is positioned relative to the browser window, and will not move even if the windown is scrolled.
The position can be specified using one or more of the properties top, right, bottom and left.
In the example below, the paragraph is fixed to 30px from the top and 5px from the right.
Paragraph with no position.
Paragraph with no position.
Fixed Position
Paragraph with no position.
Paragraph with no position.
Paragraph with no position.
A relative positioned element is positioned relative to its normal position.
The properties top, right, bottom and left can be used to specify how the rendered box will be shifted.
An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html>
Absolutely positioned element are removed from the normal flow. The document and other elements behave like the absolutely positioned element does not exist.