I have a page where the following occurs:
- some stuff is rendered. static content, and content meant to be enhanced with javascript.
- some of the divs are instrumented for enhancement via jquery in $()
- some of these 3rd party scripts measure the divs they are putting content into so they know how to render it.
- in the meantime, as other divs are enhanced, sometimes the page gets long enough that a scroll bar appears. that means the page just got thinner and the measurements that the plugins made are now incorrect.
- some divs get enhanced with the wrong width.
- ugliness!
If I resize the browser, everything “snaps” into place where it should be.
I can see 2 solutions which I don’t like.
- somehow force the browser to re-layout everything after every enhancement.
- force a vertical scrollbar. http://ryanfait.com/resources/forcing-vertical-scrollbars/
This has to be a fairly common issue. Are there other tricks or suggestions?
KISS method : force the vertical scrollbar to be there.
Forgot to mention, you can also simply use this :