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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -