Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-18-2008, 11:00 PM   PM User | #1
w i l l
New to the CF scene

 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
w i l l is an unknown quantity at this point
scroll bars in iframes

Hi,

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:

http://www.darkaudio.co.uk/v2/scroll_test/index.html

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.
w i l l is offline   Reply With Quote
Old 08-19-2008, 12:08 AM   PM User | #2
rhinodog8
New Coder

 
Join Date: Aug 2008
Location: Colfax, California USA
Posts: 64
Thanks: 3
Thanked 5 Times in 5 Posts
rhinodog8 is an unknown quantity at this point
you could use the css clip property: it's a little half-assed solution but idk exactly what your trying to create
Code:
clip:rect(top,right,bottom,left)
or for that specific iframe, insert this into the css code under iframe#iframe1:
Code:
clip:rect(0px, 274px, 355px, 0px);
rhinodog8 is offline   Reply With Quote
Old 08-19-2008, 11:15 AM   PM User | #3
w i l l
New to the CF scene

 
Join Date: Aug 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
w i l l is an unknown quantity at this point
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
http://www.darkaudio.co.uk/v2/scroll_test/index.html

The main CSS file
http://www.darkaudio.co.uk/v2/scroll_test/css/main.css

The scroller CSS file
http://www.darkaudio.co.uk/v2/scroll...ScrollPane.css

The JavaScript files:
http://www.darkaudio.co.uk/v2/scroll...y-1.2.3.min.js
http://www.darkaudio.co.uk/v2/scroll...ensions.min.js
http://www.darkaudio.co.uk/v2/scroll...sewheel.min.js
http://www.darkaudio.co.uk/v2/scroll...jScrollPane.js

Last edited by w i l l; 08-19-2008 at 12:22 PM..
w i l l is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:56 PM.


Advertisement
Log in to turn off these ads.