Positioning

Introduction

The position properties specify where the element is shown on the page.

Position Properties

Property Values Description
Z Index number, auto Specifies the stack order of an element. Z index only works on positioned elements (absolute, relative, or fixed).
Position static, relative, absolute, fixed Specifies the type of positioning method used for an element.
Top number, auto For Absolutely: positioned elements, the top property sets the top edge of an element to a unit above/below the top edge of its containing element.

For Relatively: positioned elements, the top property sets the top edge of an element to a unit above/below its normal position.

Right number, auto For Absolutely: positioned elements, the right property sets the right edge of an element to a unit to the left/right of the right edge of its containing element.

For Relatively: positioned elements, the right property sets the right edge of an element to a unit to the left/right to its normal position.

Bottom number, auto For Absolutely: positioned elements, the bottom property sets the bottom edge of an element to a unit above/below the bottom edge of its containing element.

For Relatively: positioned elements, the bottom property sets the bottom edge of an element to a unit above/below its normal position.

Left number, auto For Absolutely: positioned elements, the left property sets the left edge of an element to a unit to the left/right of the left edge of its containing element.

For Relatively: positioned elements, the left property sets the left edge of an element to a unit to the left/right to its normal position.

Was this article helpful?
YesNo
Live Editor