Results 1 to 7 of 7

Thread: Lightbox v2.03A causing webpage to "jump"

  1. #1
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Lightbox v2.03A causing webpage to "jump"

    1) Lightbox v2.03A Viewer

    2) http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) I am currently building a website on which I want to display some photos using Lightbox v2.03A. The script actually works OK and I can view the test pic I have created but the problem I am having is that the main table of the webpage containing the script now appears to 'jump' a few pixels out of position when viewing in a browser and navigating through all the menu buttons. If I remove all the lines relating to the script from the <head> of the page the problem disappears. I have experienced the same problem using the older version of Lightbox and also Thumbnail viewer.

    This is the link to the site as it stands - http://easi-web.co.uk/letterfarm

    The page containing the Lightbox script is the one called "Going Green" - if you click on each menu item in turn from the left, the Going Green page jumps out of position to the right slightly when it is selected and when you navigate back to a previous page it jumps back to the left. The problem is easier seen once you have loaded all pages into the cache and you flip between Going Geen and another page.

    The computer I am using at the moment is running IE6 and I won't be able to test in Firefox until I get home later tonight.

  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

    Not happening in Firefox or Opera. It is happening in IE 7. I see you are using a non-URL DOCTYPE for the pages. This throws IE into quirks mode. Use a valid URL DOCTYPE like:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    on all pages, that may take care of it.
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    That hasn't cured it I'm afraid, in fact changing the doctype has had the effect that some contect on the pages now wants to center itself instead of being left aligned, although I'm sure I can fix that one myself, but I am more concerned about the page jumping.

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

    Now, as long as I navigate via the links, it's fine. And the problem occurs when shifting between home and any other page (not just the going green one) when using the back and forward buttons of the browser.
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    What really frustrates me is that if I remove these lines from the Going Green page
    HTML Code:
    <script type="text/javascript" src="prototype.js"></script>
    <script type="text/javascript" src="scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="lightbox.js"></script>
    <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
    it looks OK in any browser.
    Last edited by Snookerman; 04-27-2009 at 05:48 PM. Reason: added [html] tags

  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

    The body margins are jumping. I don't think it really has to do with lightbox, since it happens between any of the pages and home. I'd try getting rid of these deprecated attributes:

    Code:
    <body topmargin="0" leftmargin="0" background="grey_bg_stripes.jpg">
    And instead, place this at the beginning of your stylesheet:

    Code:
    body {
     margin: 0;
     padding: 0;
     background-image: url('grey_bg_stripes.jpg');
    }
    Do this for all pages.
    - John
    ________________________

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

  7. #7
    Join Date
    Jul 2005
    Location
    West Lothian, Scotland
    Posts
    37
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    John - have made that change you suggested and everything looks fine in IE7 and FF at the moment. I'll have a look in IE6 tomorrow at work as a double check. Thanks for all your help on this.

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
  •