I have some divs that are set with position absolute (CSS) when the page is ready, and are positioned relative to another fixed div, which works fine. However, before the page is loaded and everything is set, if the page is resized, those absolute divs don't follow the changes, moving to other places, which I think they are given values relative to top and left of the screen.
The position of the relative div I use as starting point to position the absolute ones may change position as well, relative to the ones above it.
Is there any way to listen the changes in the browser's width / height in order to make those divs stay placed in the right position?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…