Results 1 to 2 of 2

Thread: motion gallery

  1. #1
    Join Date
    Aug 2006
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default motion gallery

    1) Script Title: motiongallery

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

    3) Describe problem: Can someone look at www.webs2impress.com/booker and tell me why my gallery is going beyond the 345 pixels I've set? Are my graphics too wide?

    Thanks in advance.

  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

    Restore this part on your page (after all it does say not to edit it):

    Code:
    <!-- Do not edit IE conditional style below -->
    <!--[if gte IE 5.5]>
    <style type="text/css">
    #motioncontainer {
    width: 550px;}
    </style>
    <![endif]-->
    <!-- End Conditional Style -->
    to:

    Code:
    <!-- Do not edit IE conditional style below -->
    <!--[if gte IE 5.5]>
    <style type="text/css">
    #motioncontainer {
    width:expression(Math.min(this.offsetWidth, maxwidth)+'px');
    }
    </style>
    <![endif]-->
    <!-- End Conditional Style -->
    And set the maxwidth variable in the script:

    Code:
    /***********************************************
    * CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for source code
    * This copyright notice must stay intact for legal use
    * Modified for autowidth and optional starting positions in
    * http://www.dynamicdrive.com/forums/showthread.php?t=11839 by jschuer1 8/5/06
    ***********************************************/
    
     //1) Set width of the "neutral" area in the center of the gallery.
    var restarea=6;
     //2) Set top scroll speed in pixels. Script auto creates a range from 0 to top speed.
    var maxspeed=7;
     //3) Set to maximum width for gallery - must be less than the actual length of the image train.
    var maxwidth=345;
     //4) Set to 1 for left start, 0 for right, 2 for center.
    var startpos=0;
     //5) Set message to show at end of gallery. Enter "" to disable message.
    var endofgallerymsg='<span style="font-size: 11px;">End of Gallery</span>';
    
    function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
    var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
    var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
    var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
    window.open(path,"", winattributes)
    }
    
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    In fact, I don't see anywhere that you have set the width to 345. You could also do so here in gallerystyle.css:

    Code:
    #motioncontainer {
    /*margin:0 auto;  Uncomment this line if you wish to center the gallery on page */
    width: 345px; /* Set to gallery width, in px or percentage */
    height: 130px; /* Set to gallery height */
    }
    - 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
  •