Jump to content

What is position absolute/relative?


satimis
 Share

Recommended Posts

Absolute positioning removes an element from the normal flow of a document and positions absolutely in relation to it's nearest ancestor with position other than static. Static positioning is the default and positions an element using normal rules.Relative positioning keeps an element in the normal flow. Kind of. It reserves space where the element is supposed to be, but shifts the actual element by whatever values you specify (if any).Giving relative positioning to an element is a common way to create a container by which to position absolute elements. This is particularly useful for creating menus, which seems to be the case in the CSS you provided.

Link to comment
Share on other sites

Absolute positioning removes an element from the normal flow of a document and positions absolutely in relation to it's nearest ancestor with position other than static. Static positioning is the default and positions an element using normal rules.Relative positioning keeps an element in the normal flow. Kind of. It reserves space where the element is supposed to be, but shifts the actual element by whatever values you specify (if any).Giving relative positioning to an element is a common way to create a container by which to position absolute elements. This is particularly useful for creating menus, which seems to be the case in the CSS you provided.
Hi Shadow,Thanks for your explanation. Could you pls illustrate them with examples which will help me understanding them better. TIAB.R.satimis
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...