 <p>I haven't found a way to do this that isn't a hack, but here's the simplest hack I could think of:</p> <pre><code>&lt;script type="text/javascript"&gt; function tweakWidthForScrollbar() { var db = document.body; var scrollBarWidth = db.scrollHeight &gt; db.clientHeight ? db.clientWidth - db.offsetWidth : 0; db.style.paddingRight = scrollBarWidth + "px"; } &lt;/script&gt; ... &lt;body onresize="tweakWidthForScrollbar()"&gt; </code></pre> <p>The idea is to detect whether the vertical scrollbar is in use, and if it is, calculate its width and allocate just enough extra padding for it.</p>