Example 1 of 2 from blog post Shifting layouts, and how to deal with them
This illustrates how ads can cause the page content to move around while you're interacting with it.
This page has ads above the header, and multiple ads within the body text.
Try it out
Reload the page, and watch both the header the lower paragraphs jump downwards as the ads appear.
First paragraph
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked.
Second paragraph
His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me?" he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls. A collection of textile samples lay spread out on the table – Samsa was a travelling salesman - and above it there hung a picture that he had recently cut out of an illustrated magazine and housed in a nice, gilded frame.
Third paragraph
It showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer. Gregor then turned to look out the window at the dull weather. Drops of rain could be heard hitting the pane, which made him feel quite sad. “How about if I sleep a little bit longer and forget all this nonsense”, he thought, but that was something he was unable to do because he was used to sleeping on his right, and in his present state couldn’t get into that position.
The fix
As with the previous example, the solution is to reserve suitably-sized containers for the elements that are causing the layout to shift. See it in action.