0

my Problem is that I need in exactly that hierachy an infoBox that pops up on an event (it will be an click on button). Div "Info" should be that. It should be independent on the parent-element. So for example if I set top:0px; and left:0px; it should be at the top left of the browserwindow. How to solve this?

<div style="postion:relative;float:left;margin-left:20px;margin-right:20px;">
  <div style="postion:relative;float:left;margin-top:100px">
    <div id="info" style="display:hidden;background-color:red"></div>
  </div>
</div>
4

1 回答 1

0

将位置设置为绝对将始终使用浏览器窗口中的绝对位置(例如 top:0px;left:0px 是浏览器窗口的左上角)。

于 2012-09-24T08:11:30.880 回答