View Full Version : I new to this

09-03-2006, 11:10 PM

I'm tring to add "scrollable content" from the "dynamic content". The problem is the fact I don't know how to move the box to a different area of the page because it's in the top left corner. I know how to change the size and color.

09-04-2006, 01:30 AM
Just put the code wherever you want the Scrollable content to appear in the body of your page. A frequent mistake is putting the code in the head of the page.

09-04-2006, 02:07 AM
I still need help, somebody please copy and paste the code exactly where it would go in a html document

09-04-2006, 02:21 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<p> Hey look! The scroller is <b>below</b> me because that is where it is in the <b>body</b>.</p>
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="lightyellow">
<div id="scroll3" style="width:170px;height:150px;background-color:lightyellow;overflow:auto">
<big>T</big>his is a cool script that allows you to compact any content and confine it within a scrollable mini "window" Save valuable document space while making your page more "interactive", all at the same time! This script uses two different techniques- one for IE, one for NS- to create the scrollable window. Scrollbars will be available to IE 4 users to scroll the window, while NS users will need to use the "up" and "down" buttons instead (since NS does not support the adding of scrollbars to contents).


* Scrollable content Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code

var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)

function clearup(){
if (window.temp2)

function cleardown(){
if (window.temp)

<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
<p> Hey look! The scroller is <b>above</b> me because that is where it is in the <b>body</b>.</p>

09-04-2006, 02:27 AM
that's what I did and I still keeps staying at the top left of the page how do I change the location on the page?

09-04-2006, 04:30 AM
Can't make it any simpler than that. Copy and paste the above (my last post) into a text editor and save as test.htm and view it in the browser. You will see that the first paragraph is above the scroller and that the second paragraph is below it. You can put the scroller inside a table if you like, or in a division (<div></div>), anywhere. If you know how to place other items, like images for example, on a page using a text editor - then just treat the entire script and its markup as though it is an image tag.