Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving elements having absolute anchored position by using a container 1

Status
Not open for further replies.

picardout

Programmer
Aug 31, 2009
2
CA
Hi,

I need to embed some elements in a container, so that the elements anchored at absolute position 0 will actually follow the container's position.
(I use DOM's removeChild/appendChild to move around the nodes/elements)
What should I use as container? Frame, DIV, IFrame?

Thanks!
 
Correction: Please read "fixed" positioned elements, not "absolute".

Thanks!
 
Div should be the choice.

To put a position fixed styled element to the parentNode div with parentNode div of some default static positioning, I think, you would have further to equate the left and top style of the fixed position child coincide with the parentNode in addition to executing the appendChild method in the javascript function, otherwise, the fixed position child should not follow any logic of the position of its parent container. It is taken out of the natural flow, is it not? If there is any doubt, I think our css forum
should be in a better position to answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top