PDA

View Full Version : scrollable content script



vagrant
03-15-2006, 07:15 AM
Does anyone know how to remove the bottom scroll bar from an iframe. All of my content is sized to fit the window horizontally so all I would need would be the vertical scrolling.

I'm currently using the "scrollable content" script from the dynamic content section of scripts.

Thanks for any advise

jscheuer1
03-15-2006, 07:36 AM
If your content is truly narrow enough to fit the horizontal dimensions (this can be tricky because default page and other margins and/or padding must be taken into account), all that is required is that your iframe's scrolling attribute be set to 'auto':


<iframe src="whatever.htm" scrolling="auto"></iframe>

vagrant
03-15-2006, 06:25 PM
Thanks for the reply,
The script in question (scrollable content) doesn't appear to have the "scrolling" variable so I'm not sure where to go from here.

thanks again,

jscheuer1
03-15-2006, 06:52 PM
It is not a variable. It is an attribute of the iframe tag, like width or height.

Warning: Please include a link to the DD script in question in your post.
PLEASE: Include the URL to your problematic webpage that you want help with.

vagrant
03-15-2006, 08:16 PM
Sorry about that... started putting the URL in twice and brain farted twice.


Script: Scrollable Content
http://www.dynamicdrive.com/dynamicindex11/scrollc.htm

In any event the scrolling "parameter/tag" doesn't appear to be used in the script (not that I saw, anyways).

I have removed the code at the bottom of the script between the <span></span> tags to resolve a different issue.

Thanks again

jscheuer1
03-15-2006, 08:55 PM
That script doesn't use an iframe, here is where the scrollbar behavior is set:


<div id="scroll3" style="width:170px;height:150px;background-color:lightyellow;overflow:scroll">

Change it to this:


<div id="scroll3" style="width:170px;height:150px;background-color:lightyellow;overflow:auto">

and as long as your content is narrow enough and/or can wrap to narrow enough dimensions to fit the division's width, there will be no horizontal scrollbar.

vagrant
03-16-2006, 02:34 AM
Thanks,
I'll give it a go!!


Thanks again,

vagrant
03-16-2006, 05:15 PM
Thanks that did the trick!!

mclark2112
07-10-2006, 04:03 PM
Excellent, I was looking for this ability too, thanks!!!!

I won't try this until tonight, but how hard would it be to mix this script with the Tabbed Content script?