Question:

Whats the code for make a bunch of pics slide together ?

by  |  earlier

0 LIKES UnLike

its cuz i found the code but it had only one "url here" and so i put it over and over and and it makes that one pic slide and i want the all to slide in 1 line

so yea could explain that to me

it would be very much appriciated:D

 Tags:

   Report

1 ANSWERS


  1. You didn't say whether for vertical or horizontal.  Here's horizontal:

    <head>

    <style type="text/css">

    // START Optional //

    body {

         background:#006 url(images/bodyBg.jpg) no-repeat center fixed;

    }

    // END Optional //

    #container {

         position:relative;

         width:424px;

         height:106px;

         overflow:hidden;

         border:5px double #000;

         background-color:#fff;

         margin:100px auto 0 auto;

    }

    #div1 {

         position:absolute;

         left:0px;

         top:0px;

         width:424px;

         height:106px;

    }

    #div2 {

         position:absolute;

         left:424px;

         top:0px;

         width:424px;

         height:106px;

    }

    img {

         border:1px solid #000;

         margin:2px;

         float:left;

    }

    </style>

    <script type="text/javascript">

      var m=0;

      var n=424;

      var speed=20;

    function scrollPics() {

         document.getElementById('div1').style.le...

         document.getElementById('div2').style.le...

       m--;

       n--;

    if(m==-424) {

       m=424;

    }

    if(n==-424) {

       n=424;

    }

    setTimeout('scrollPics()',speed);

    }

    window.onload=function() {

       scrollPics();

    }

    </script>

    </head>

    <body>

    <div id="container">

    <div id="div1">

    <img src="images/anim1.gif" alt="">

    <img src="images/anim2.gif" alt="">

    <img src="images/anim3.gif" alt="">

    <img src="images/anim4.gif" alt="">

    </div>

    <div id="div2">

    <img src="images/anim1.gif" alt="">

    <img src="images/anim2.gif" alt="">

    <img src="images/anim3.gif" alt="">

    <img src="images/anim4.gif" alt="">

    </div>

    </div>

    </body>

    Put in paths to your own images and adjust positioning to suit.

    Ron

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.