sam
sam

Reputation: 5599

Javascript: creating div with absolute positioning

Just wondering if there's a way to position a div with absolute so that it ignores EVERYTHING else, if my site clears floats it seems divs that are created with Javascript and absolute positioning are still effected by it, is there any way to make them ignore EVERYTHING else and go exactly where I set them, regardless?

Upvotes: 0

Views: 665

Answers (1)

anddoutoi
anddoutoi

Reputation: 10111

position: absolute means that the object is positioned in context of it´s closest positioned ancestor element or the viewport if no ancestor element is positioned. So put your absolute positioned elements as direct children to the body element and you´ll be fine.

Upvotes: 2

Related Questions