开发者

Javascript: creating div with absolute positioning

开发者 https://www.devze.com 2022-12-23 05:58 出处:网络
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 ar

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 th开发者_高级运维em, regardless?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消