Results 1 to 3 of 3

Thread: 2 CMotion on page placement?

  1. #1
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 2 CMotion on page placement?

    1) Script Title:2 CMotion Image gallery position

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...iongallery.htm

    3) Describe problem: I would like to be able to place approximately 5 galleries in a row on my page. I am able to create the galleries just fine, but when I add titles and new layers to my page the galleries just run at the top or wherever I put hard <br> in the html code ( I have them centered through the script). Can I put these in a layer and move them anywhere I choose in a html editor program? When I have tried and then previewed in browser the scripts don't run. I assume it is because the .js file cannot run in an undefined layer? I am a rookie here so any help would be greatly appreciated. Thanks in advance.

    Chad

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You seemed to have solved this:

    http://www.dynamicdrive.com/forums/s...4079#post54079

    But the time stamp on that post is before the one on this post. If you are still having problems, the calls for individual galleries can be in separate script blocks:

    Code:
    <script type="text/javascript">
    new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
    </script><br>
    <script type="text/javascript">
    new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
    </script>
    Or, if you want them to touch vertically:

    Code:
    <script type="text/javascript">
    new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
    </script>
    <script type="text/javascript">
    new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
    </script>
    Or even:

    Code:
    <script type="text/javascript">
    new cmotiongallery(gallery, 6, 7, 1000, 0, '50%', 225, 'c')
    new cmotiongallery(gallery2, 6, 7, 1000, 1, '50%', 225, 'c')
    </script>
    If you want them side by side (don't use percentage width):

    HTML Code:
    <table style="border-collapse:collapse;" cellpadding="0" cellspacing="0">
    <tr>
    <td><script type="text/javascript">
    
    new cmotiongallery(gallery, 6, 7, 1000, 0, 300, 225, 'c')
    </script>
    </td>
    <td><script type="text/javascript">
    
    new cmotiongallery(gallery2, 6, 7, 1000, 0, 300, 225, 'c')
    </script></td>
             </tr>
             </table>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I've been playing around with this script a bit more. I never had thought about having two side by side. I found a way where the percentage width can be used. I had to make a minor update to the script motiongallery_oo.js so you should download it again:

    http://home.comcast.net/~jscheuer1/s...ngallery_oo.js

    This markup (DOCTYPE required) worked well for side by side:

    HTML Code:
    <div style="width:80%;margin:0 auto;"><div style="float:left;width:49%;"><script type="text/javascript">
    new cmotiongallery(gallery, 6, 7, 1000, 1, '100%', 227)
    </script></div><div style="float:left;width:49%;">
    <script type="text/javascript">
    new cmotiongallery(gallery2, 6, 7, 1000, 0, '100%', 227)
    </script></div></div><div style="clear:left;"></div>
    These can also be stacked vertically.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •