Tachyons Layout Position
The position property is used to align the different elements in the HTML page. The position property plays an important role to make high-quality web pages.
- static: This class is used to position elements according to the normal flow of the page.
- relative: In this case, the element remains in the normal flow of the document but left, right, top, and bottom effects. Elements get shifted from their original position in the document creating vacant space and other elements may adjust themselves according to the vacant space left by the element.
- absolute: Absolute elements do not follow the normal flow document instead they position themselves relative to the closest positioned ancestor. Its final position is determined using the top, bottom, left, and right.
- fixed: Fixed element does not follow normal document flow and position themselves relative to <HTML> tag. This element always sticks to the screen.
<element-name class="class-name"> ... </element-name>
Example 1: In the below code, we will make use of the above classes to demonstrate the position property.
Example 2: In the below code, we will make use of the above classes to demonstrate the position property.
My Personal Notes arrow_drop_up
Please Login to comment...