Clever Geek Handbook
Firefox overflow: scroll resize
In Firefox ...
<div id="container" style="overflow:scroll; width:400px; height:500px">
<div id="content" style="height:500px; width:800px"/>
</div>
The "container" DIV must have scroll bars, since the div with the "content" id is wider than it.
If, using JavaScript (see below), I reset the size of the "content" section to "200px", I would expect the scrollbars in the container div to disappear. They won't unless I manually resize the browser window.
function Resize() {
document.getElement("content").style.width="200px";
}
I tried to force pay for the container by applying the css class. It didn't work ...
function Resize() {
document.getElement("content").style.width="200px";
document.getElement("container").className="test";
}
0
source to share
All Articles