jQuery adding/removing DOM elements: Scrollbar issue
I wrote a jQuery function that dynamically adds or removes messages boxes from the DOM. Depending on the site's content and the number of message boxes, the browsers scrollbar appears. Sometimes, only the appearing of one message box causes that scrollbar. When this box is removed, the scrollbar disappears and the whole site jumps a few pixels sideways.
Is there any way to fix it?

I've tried `overflow: hidden` on the `body`. This works of course, but is also pointless because then you can not scroll the site's content.
jQuery adding/removing DOM elements: Scrollbar issue
===

I wrote a jQuery function that dynamically adds or removes messages boxes from the DOM. Depending on the site's content and the number of message boxes, the browsers scrollbar appears. Sometimes, only the appearing of one message box causes that scrollbar. When this box is removed, the scrollbar disappears and the whole site jumps a few pixels sideways.
Is there any way to fix it?

I've tried `overflow: hidden` on the `body`. This works of course, but is also pointless because then you can not scroll the site's content.