Results 1 to 5 of 5

Thread: need help with lightbox code

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

    Default need help with lightbox code

    1) Script Title: lightbox

    2) Script URL (on DD):

    3) Describe problem: i got the lightbox working properly. i have read posts on here about how to get links working in the image and it is working. but the link only shows when i do a mouseover on the bottom left corner of the image. i have one test image working. i want the link to show the customary blue and allways be there so the people can see the link without having to accidently find it in the bottom left corner. here is the code i am using.

    Code:
    <a href="images1/image5.JPG" rel="lightbox[map]" title="<a href='http://www.cybersmods.com/modules.php?name=Downloads&op=getit&lid=2/'>DOWNLOAD THIS MAP</a>"><img border="0" src="images1/thumb5.jpg"/></a></td>

  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

    Add a class to the link(s), ex:

    Code:
    <a href="images1/image5.JPG" rel="lightbox[map]"
    title="<a class='inbox' href='http://www.cybersmods.com/modules.php?name=Downloads&op=getit&lid=2/'>DOWNLOAD THIS MAP</a>"><img
    border="0" src="images1/thumb5.jpg"/></a></td>
    Once you have that, you can style it/them (in your stylesheet) like any other class of links, including pseudo classes, ex:

    Code:
    .inbox:link {
    color:blue;
    }
    .inbox:visited {
    color:purple;
    }
    .inbox:active {
    color:red;
    }
    - John
    ________________________

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

  3. #3
    Join Date
    Mar 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, that worked. the link is showing now. thanks for that. One more question though. when i hover over the picture, it prints the entire link with the class name and everything. is there a way to hide that part of the title tag. maybe have a title for the pic then the link part hidden from the viewer?

    Code:
    			<a href="images1/image5.JPG" rel="lightbox[map]" title="&lt;a class='map' href='http://www.cybersmods.com/modules.php?name=Downloads&amp;op=getit&amp;lid=2/'&gt;DOWNLOAD THIS MAP&lt;/a&gt;"><img border="0" src="images1/thumb5.jpg"/></a></td>

  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

    Here's one way:

    Code:
    <a href="images1/image5.JPG" rel="lightbox[map]"
    title="&lt;a class='map' href='http://www.cybersmods.com/modules.php?name=Downloads&amp;op=getit&amp;lid=2/'&gt;DOWNLOAD THIS MAP&lt;/a&gt;"
    onmousedown="this.title='<a class=\'inbox\' href=\'http://www.cybersmods.com/modules.php?name=Downloads&op=getit&lid=2/\'>DOWNLOAD THIS MAP</a>';"
    onmouseout="this.title='<a class=\'inbox\' href=\'http://www.cybersmods.com/modules.php?name=Downloads&op=getit&lid=2/\'>DOWNLOAD THIS MAP</a>';"
    onmouseover="this.title='Map #5';"><img border="0" src="images1/thumb5.jpg" alt=""></a>
    This simpler method may work:

    Code:
    <a href="images1/image5.JPG" rel="lightbox[map]"
    title="&lt;a class='map' href='http://www.cybersmods.com/modules.php?name=Downloads&amp;op=getit&amp;lid=2/'&gt;DOWNLOAD THIS MAP&lt;/a&gt;"><img
    border="0" src="images1/thumb5.jpg" alt="" title="Map #5"></a>
    But I'm not sure if all browsers will use the image's title for hover instead of the link's.
    - John
    ________________________

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

  5. #5
    Join Date
    Mar 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks alot. it worked very good.

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
  •