View Full Version : scroll bars in iframes

w i l l
08-19-2008, 12:00 AM

I'm having a problem with scroll bars.

I'm looking for a method of replacing the default browser scrollbars with custom ones, on <div> tags on pages INSIDE <iframe> tags.

This page shows an example of the problem:


the top three panels are <div> tags on the page. The bottom one is an <iframe> with a page inside it with the same <div> on it.

How can I go about preventing the scroll bar from insetting itself as in the bottom example?

Thanks again.

08-19-2008, 01:08 AM
you could use the css clip property: it's a little half-assed solution but idk exactly what your trying to create

or for that specific iframe, insert this into the css code under iframe#iframe1:

clip:rect(0px, 274px, 355px, 0px);

w i l l
08-19-2008, 12:15 PM
I've just done a bit of fiddling and it actually doesn't seems to be the <iframe>

If you look at http://www.darkaudio.co.uk/v2/scroll_test/index.html now you'll see that the top two <div>s now have the problem too and it's only the left <div> which doesn't have the Javascript scroll applied that's ok... so maybe its a CSS or Javascript problem?

The code is below. I'd be grateful if anyone could spot the problem, if not do you know of an alternative script for this? MooTools?

Many thanks.

The page

The main CSS file

The scroller CSS file

The JavaScript files: