Log in

View Full Version : controlling scroll while using frame



aqeel
10-01-2009, 05:45 PM
i used nested frames but i dont want to scroll them saparately i want the scrolling of frames at the same time as any normal page we scroll in browser is it possible in short i want to to use single scroll bar for the frames i am using in my site

jscheuer1
10-01-2009, 06:48 PM
Much will depend upon if your overall design (particularly the dimensions of the iframes visa vis the space required by their contents) will support this without making portions of the content within any one of the iframes inaccessible (unable to be seen). If not, this will still work, but you will end up with a not too good page.

That said, you may set the overflow property of of the pages within the iframes (both their html and body selectors) to hidden:


html, body {
overflow: hidden;
}

However, this may not be enough for some browsers. So one should also set each iframe's scrolling attribute to no:


<iframe src="whatever" scrolling="no"></iframe>