satimis Posted May 2, 2011 Share Posted May 2, 2011 Hi folks,Pls help me to understand "position absolute/relative" on #menu li {position: relative;}#menu ul ul ul {position: absolute;top: 0;left: 100%;} TIAB.R.satimis Link to comment Share on other sites More sharing options...
ShadowMage Posted May 2, 2011 Share Posted May 2, 2011 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 More sharing options...
satimis Posted May 2, 2011 Author Share Posted May 2, 2011 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 More sharing options...
thescientist Posted May 2, 2011 Share Posted May 2, 2011 have you tried looking in the tutorials or googling for example/explanations/descriptions? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.