Results 1 to 3 of 3

Thread: centering slideshow

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default centering slideshow

    1) Script Title: Ultimate fade-in slideshow

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

    3) Describe problem: How do I centre the slideshow on my web page. The show works well except I need to centre it on the page.
    I added a <centre> tag which has amost centred the show but not quite. I'm not really sure what I'm doing, so some help would be appreciated.
    Thanks in advance.

    Wasn't sure how to put this in [code]

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript" src="fadeslideshow.js">

    /***********************************************
    * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/

    </script>

    <CENTER><script type="text/javascript">

    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [800, 600], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
    ["1.jpg"],
    ["2.jpg"],
    ["3.jpg"],
    ["4.jpg"]
    ],
    displaymode: {type:'auto', pause:2500, cycles:0, wraparound:true},
    persist: true, //remember last viewed slide and recall within same session?
    fadeduration: 1500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
    })


    </script>
    <div id="fadeshow1"></div>


    <br />

    [code]




    </head>

    <body>



    </body>
    </html>
    Last edited by jenphoto; 10-27-2009 at 02:49 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,127
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    Let's see. The center tag has been deprecated. I know, it really doesn't make a lot of sense to me either, even though I understand the subtleties of why it wasn't really working out. To make matters 'worse', the way to center things now is to set their margin to margin: 0 auto; in the stylesheet.

    And that's just the short answer. But I would try getting rid of the center tag and putting this in the head of your page:

    Code:
    <style type="text/css">
    #fadeshow1 {
     margin: 0 auto;
    }
    </style>
    And if you don't already have a valid URL DOCTYPE as the very first thing in your page's source code, you will need that too. If that's a mystery to you, let me know, I think I can explain that as well.

    But things would be easier in any case, if you want more help, if I had a link to your page, if so:

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thankyou very much John. I thought it would be something fairly simple but didn't know what.
    And yes, the page does have a valid URL DOCTYPE as the first thing on the page.
    In future, if I need more help, I will post a link.

    Thanks again.
    Jen

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
  •