"Top-level position" does not necessarily mean first, it means that it should be near the top of the DOM tree.
<strong> Examples:
<body> <div id="content"> <div id="modal"></div> </div> </body>
This is not at the top of the DOM because div#modal is inside div#content . So, we have this DOM tree:
body +-> div#content +-> div#modal
Another example:
<body> <div id="content"> </div> <div id="modal"></div> </body>
Although the div#modal not at the top of the page, it is at the top of the DOM tree:
body +-> div#content +-> div#modal
Mtcoster
source share