开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜