Position Property

With the assistance of Position Property, you can put your HTML components in your preferred situation.
position: static;
- It is the default position of HTML components.
- The default position of all the crates in the above picture is static.
position: relative;
- It is utilized when we need to situate an HTML component comparative with its ordinary position.
- We can set the top, right, base, and left properties that will make the component change away from the typical position.
position: outright;
- A component with the outright position will move as indicated by the situation of its parent component.
- Without any parent component, the HTML component will be put comparative with the page.
position: fixed;
- A component with position: fixed; will stay adhered to a particular position even after the page is looked over.
- This position property is utilized when we need to keep an HTML component at a decent recognize regardless of where on the page the client is.
position: sticky;
- It is a crossover of relative and fixed positions.
- An HTML component with position: tacky; will simply stay there until a given position offset is met.

0 Comments