Web Analytics Made Easy -
StatCounter Scrollable Content 1 - CodingForum


No announcement yet.

Scrollable Content 1

  • Filter
  • Time
  • Show
Clear All
new posts

  • Scrollable Content 1

    I am trying to move the Scrollable Content box from the left side of the page to the right, and just can't figure out how to do it. (I'm very new at CSS & JavaScript). Also, is there a way that I could get rid of the scrollbar at the bottom of the box? And thirdly (I know this is a lot) is there any way I can make the box more defined, such as having black lines on the top and left side as well as the scrollbar on the right & bottom?

    Here is the code I have the questions about:

    Here's my source code (the same as above, except width & height#s):

    <ilayer name="scroll1" width=250 height=250 clip="0,0,250,250">
    <layer name="scroll2" width=250 height=250 bgColor="white">
    <div id="scroll3" align="left" style="width:250;height:250;background-color:white;overflow:scroll">


    Scrollable content Script-
    © Dynamic Drive (www.dynamicdrive.com)
    For full source code, installation instructions,
    100's more DHTML scripts, and Terms Of
    Use, visit dynamicdrive.com

    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>

  • #2
    I've just had a little play and if you add
    position: absolute; left: nnn
    this to the scroll3 style (nnn being a number of pixels to shift it across the page) it does move it, but the problem is that you dont know how wide the window is going to be unless it is going into a fixed width table. I'm sure there are other ways but at least this is something to play with in the mean time.
    An answer needs a question just as much as a question needs an answer. Deep eh!