Position

The position property is used to position an element.

Value Description
absoluteGenerates an absolutely positioned element, positioned relative to the first parent element that has a position other than static. The element's position is specified with the 'left', 'top', 'right', and 'bottom' properties
relative Generates a relatively positioned element, positioned relative to its normal position. The element's position is specified with the 'left', 'top', 'right', and 'bottom' properties
fixedGenerates an absolutely positioned element, positioned relative to the browser window. The element's position is specified with the 'left', 'top', 'right', and 'bottom' properties
staticDefault. No position, the element occurs in the normal flow (ignores any top, bottom, left, right, or z-index declarations)
sticky

A stickily positioned element is an element whose computed position value is sticky. It's treated as relatively positioned until its containing block crosses a specified threshold (such as setting top to value other than auto) within its flow root (or the container it scrolls within), at which point it is treated as "stuck" until meeting the opposite edge of its containing block.

Getting sticky to work can be tricky sometimes. Certain CSS settings can break it, like an overflow setting of hidden, scroll, or auto on a parent element. Also you must set top, bottom, left, or right to something for it to work. See a discussion of sticky including 6 things that can break it here.

Themeover CSS Reference

Close