html - Is position:absolute always counted from the top of the page? -


if make element inside , give properties position:absolute;top:10px; count 10px top of page , not inside .

is normal or should use instead position:relative; or something?

thanks answers!

absolute not related border of page. if take example:

<div class="box1" style="position:relative;">   <div class="box2" style="position:absolute;top:5;"></div> </div> 

the position of box2 dependent on position of box1.


Comments

Popular posts from this blog

php - Using str_replace to translate a MySQL Table in html -

SQL Server - MyCTE query based on 24 hour period (next day) -

asp.net mvc - Cannot display error message on Editor or EditorFor -