Results 1 to 3 of 3

Thread: LightBox v2.03 Help please

  1. #1
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default LightBox v2.03 Help please

    1) Script Title: Lightbox JS v2.03

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

    3) Describe problem: Not working properly on image sets.

    Ok I have a button on my website that has a rollover mouse image and when I click on it I would like it to go the lightbox.

    It works fine shen using one picture but when I try to add more images and group them together it knocks the buttons out of kilter and things don't line up, I don't know why it is doing this, Here is my code using one image:

    <td colspan="3" rowspan="4"><a href="images/adpic1.jpg" rel="lightbox" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image67','','images/index_23.gif',1)"><img src="images/2nd_nav_portfolio_off.gif" alt="View Portfolio" name="Image67" width="95" height="119" border="0"></a></td>

    And here is my code using a set of images:

    <td colspan="3" rowspan="4"><a href="images/adpic1.jpg" rel="lightbox[ads]" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image67','','images/index_23.gif',1)"><img src="images/2nd_nav_portfolio_off.gif" alt="View Portfolio" name="Image67" width="95" height="119" border="0"></a>
    <a href="images/adpic2.jpg" rel="lightbox[ads]"></a>
    <a href="images/adpic3.jpg" rel="lightbox[ads]"></a>
    <a href="images/adpic4.jpg" rel="lightbox[ads]"></a>

    </td>

    I have also added a couple of screenshots to show you how it messes up:





    Just to say that the lightbox does work on the image set it just knocks my other images out. I hope someone can help.

  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

    Depending upon a number of factors (like the browser, DTD, the sort of element(s) and style involved, and where it is), a linebreak in your source code can sometimes be as good as a space and/or a <br> tag.

    Here is what I would suggest:

    Code:
    <td colspan="3" rowspan="4"><a href="images/adpic1.jpg" rel="lightbox[ads]" 
    onMouseOut="MM_swapImgRestore()" 
    onMouseOver="MM_swapImage('Image67','','images/index_23.gif',1)"><img 
    src="images/2nd_nav_portfolio_off.gif" alt="View Portfolio" name="Image67" 
    width="95" height="119" border="0"></a><div style="display: none;">
    <a href="images/adpic2.jpg" rel="lightbox[ads]"></a>
    <a href="images/adpic3.jpg" rel="lightbox[ads]"></a>
    <a href="images/adpic4.jpg" rel="lightbox[ads]"></a>
    </div></td>
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much John, it worked a treat!

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
  •