Results 1 to 7 of 7

Thread: Problem with left margin in fadeslideshow 2.6.1

  1. #1
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with left margin in fadeslideshow 2.6.1

    Fadeslideshow 2.6.1
    2) Script URL (on DD):

    3) Describe problem:
    I am having problems with fadeslideshow.js inserting a margin-left:6px on initial load of an image. If I enlarge my screen even slightly the margin-left: goes to 0 and everything looks fine on the slide show. Images show the difference in Margin left for the same slide. For this site we need it to be margin-left:0 always for all screen sizes except a phone where we don't run the slide show.

    Website is a work in progress at tipsandbox.net/indexbbc.php

    We have not run into the problem when all of the slide shows were width:100% but on this site we are restricting the overall site width to 80% Perhaps that is what our problem comes from.

    Thanks for any help.
    Click image for larger version. 

Name:	marginleft6.jpg 
Views:	140 
Size:	19.9 KB 
ID:	5924



    Click image for larger version. 

Name:	margin-left0.jpg 
Views:	131 
Size:	19.7 KB 
ID:	5923

  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

    Margin on images within the display is used by the script for centering when images of multiple dimensions are used, even when they are not, it's set to 0. If you want to set a margin on the show, put a container division around it and set the margin on that.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I assumed you were talking about the div that holds the show..(in our case we named that div "index2show" I put a container div around that with margin set to 0 It had no effect. There is only one image currently in the slide show. so it should not be a multiple dimension image problem. We are centering the whole show in a div with margin:0 auto and setting the width of that container to 80%. The margin occurs... however if we enlarge the screen area even a couple of mm the slide show refresh sets the margin-left to 0. Contrary to what you said about image dimentions since we have only one image loaded...the left-margin is set to something other than 0. For our purposes we want it to 0 no matter what. Is that doable

    Thanks for you quick response.
    David

  4. #4
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Quote Originally Posted by dclark View Post
    I assumed you were talking about the div that holds the show..(in our case we named that div "index2show" I put a container div around that with margin set to 0 It had no effect. There is only one image currently in the slide show. so it should not be a multiple dimension image problem. We are centering the whole show in a div with margin:0 auto and setting the width of that container to 80%. The margin occurs... however if we enlarge the screen area even a couple of mm the slide show refresh sets the margin-left to 0. Contrary to what you said about image dimentions since we have only one image loaded...the left-margin is set to something other than 0. For our purposes we want it to 0 no matter what. Is that doable

    Thanks for you quick response.
    David
    I think John was quite clear that you need an additional <div> container around the one for the slideshow. You can then set the margins on that extra <div> to whatever you want. If you want the left margin of the slideshow itself to always be zero you will have to ensure that the slides are all the same size and the slide show width in the JavaScript instantiation is set to exactly the same width as the slides.

  5. #5
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I am sure you both are well intentioned..but you are not understanding my messages. We DO have a surrounding <div> set to 0 margin and we currently only have 1 image in the slide show so that it is NOT different image sizes. I will review previous sites that we have done this without this problem to see if I can find the cause. Previously we may have used ver 2.4 with the responsive addition.

    Thanks again for you help... If we find the cause...I'll post the fix...

  6. #6
    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

    An issue is that you cannot have only one image in a slideshow. If you just want one image, it should just be a single image tag. The entire slideshow concept requires at least 2 different images. If you have only one image and are having problems, either you have the dimensions of the slideshow set in some problematic manner, or the difficulty arises in some other manner from the fact that there is only one image when the script expects at least two.

    Forgive me if I missed it, could you state in as simple a way as possible why you would want a slideshow with only one image in it?

    Further, even if having just one image isn't the problem, responsive design doesn't mean that things just work out. Sometimes the rest of the page is at issue. Other styles for the page that affect all images might be at issue. if the page has no height set (html and/or body tag) in style, or if the page's actual width is not the intrinsic 100% but something greater or lesser due to styles and/or elements that exceed or constrain that, sometimes it's impossible for this script to react as might be expected.

    I'll have a closer look IF after you add another image there's still a problem. I'd also say to experiment with just an image tag. If after eliminating the slideshow, there's still a problem, then it's obviously not the slideshow, but can probably be worked with more easily.
    Last edited by jscheuer1; 08-16-2016 at 08:15 PM. Reason: add info
    - John
    ________________________

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

  7. #7
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    As John wrote the JavaScript instantiation of the slide show must have at least two entries in the image list. If you are currently using the slide show as place holder for future expansion, simply put the same image in twice. I use this trick quite a lot where I want some images to appear for longer than others.

Similar Threads

  1. FadeSlideShow 5px TOP/LEFT margin
    By royercas in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 05-29-2012, 04:43 PM
  2. FadeSlideShow pushed to left of page
    By mfloyd in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 08-31-2011, 05:56 AM
  3. Help with negative margin-left in IE 7
    By MacTyler in forum CSS
    Replies: 0
    Last Post: 08-27-2008, 03:36 AM
  4. IE6 - Double left margin?
    By burgeamon in forum CSS
    Replies: 2
    Last Post: 12-04-2007, 10:57 AM
  5. Issues with margin-left
    By naiani in forum CSS
    Replies: 4
    Last Post: 11-18-2007, 05:17 AM

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
  •