Results 1 to 2 of 2

Thread: Move description / Swiss Army Slideshow

  1. #1
    Join Date
    Apr 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Move description / Swiss Army Slideshow

    http://www.dynamicdrive.com/dynamici...army/index.htm

    I would like to have the picture with the controls under the picture. I would like for the description to be on the right side of the picture with a heading and a short description aligned with the top of the picture.

    For example:

    ---------
    |picture | Picutre caption
    |picture | Picture description
    |picture |
    ---------
    < - >


    Is there a way to move the heading/picture from under the picture to the right of the picture?

    Thanks!
    Last edited by ruser; 04-16-2007 at 01:05 AM.

  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

    Working from the first demo show, and if I understood you correctly, this looked about right:

    Code:
    <style type="text/css">
    #show1 {
    width:22em;
    margin:0 auto;
    }
    #master0 {
    float:left;
    padding-right:1ex;
    }
    #show1 #ctrl0 {
    clear:left;
    text-align:left;
    }
    #show1 input {
    margin-top:1em;
    position:relative;
    left:4px;
    width:2.9em;
    }
    #show1 #gostp0 {
    width:3.7em;
    }
    #show1 #desc0, #show1 #desc0 b, #show1 #desc0 span {
    text-align:left;
    font-family:Comic Sans MS, cursive;
    }
    
    </style>
    Code:
    var slides=[]; //FIRST SLIDESHOW
    //configure the below images and descriptions to your own. 
    slides[0] = ["../../side/files/photo1.jpg", "<b>Heading 1<\/b><br>Kissing Fools"];
    slides[1] = ["../../side/files/photo2.jpg", "<b>Heading 2<\/b><br>Seated Woman"];
    slides[2] = ["../../side/files/photo3.jpg", "<b>Heading 3<\/b><br>The Dog Lovers"];
    slides[3] = ["../../side/files/photo4.jpg", "<b>Heading 4<\/b><br>Standing Woman"];
    slides[4] = ["../../side/files/photo5.jpg", "<b>Heading 5<\/b><br>John, Mary and Jesus - Will this wrap?"];
    //optional properties for these images:
    slides.no_added_linebreaks=1; //use for no added line breaks in formatting of texts and controls
    HTML Code:
    <div id="show1"><script type="text/javascript">
    //Notes on Parameters: The only required parameter is the slides_array_name.  If Width is used, so must Height.
    //Interval is optional too.  It is always last, either fourth after Width and Height or second after Slides_array_name.
    //Usage: new inter_slide(Slides_array_name, Width, Height, Interval)
    new inter_slide(slides)
    if(document.createElement){
    iss[0].go('imgdsc0').parentNode.id='desc0';
    iss[0].go('prev0').parentNode.id='ctrl0';
    }
    </script></div>
    Notes: em's and ex's were used in the style section to accommodate browsers that still resize based upon font-size, otherwise the style section could have been:

    Code:
    <style type="text/css">
    #show1 {
    width:280px;
    margin:0 auto;
    }
    #master0 {
    float:left;
    padding-right:5px;
    }
    #show1 #ctrl0 {
    clear:left;
    text-align:left;
    }
    #show1 input {
    margin-top:14px;
    position:relative;
    left:4px;
    width:38px;
    }
    #show1 #gostp0 {
    width:49px;
    }
    #show1 #desc0, #show1 #desc0 b, #show1 #desc0 span {
    text-align:left;
    font-family:Comic Sans MS, cursive;
    }
    
    </style>
    And, this will still be fine in browsers set to 100% and browsers that resize by 'zooming'. The rest is pretty much straightforward, except this part from the in body call:

    Code:
    if(document.createElement){
    iss[0].go('imgdsc0').parentNode.id='desc0';
    iss[0].go('prev0').parentNode.id='ctrl0';
    }
    These simply create style hooks for the description and control container divisions. The 0's here and in the style section designate the first show on a given page.
    - 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
  •