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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

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

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