what is definition of relative ,static,fixed,absolute









Relative Position:

this is most confusing in other words, it is adjusted according to what plan or pixels you give it to work as per example if you set the value

left:20px , it would work from first leaving 20 pixels and there it would stay from 20 pixels.

Static Position:

every element is static by default ; you do not need to bother it about.

as per every positioning in element is static by defualt and positioning happens by cascadingly so it’s use is rare.

Absolute Position:

this is right position if you want that you div or class etc. stays at same position without hurting other divs or classes etc.

but try best to use it minimum (in other words to some extent)so that you site proper functionality does work best.

Fixed Position:

it’s used cannot be ignored as it has its own value of use as per your site or page scroll down or up it stays where it is .

so if you want that some specified element or div or class or whatsoever must be stayed all the time on your page ; you must use it.

thanks for reading

have a fun !