View Full Version : Lightbox 2 Help Needed

11-10-2008, 07:32 PM
How can i link my buttons (officially pictures but i saved them as a navigation bar really) to my lightbox 2 application. Lightbox works perfectly when you click the image1 writing but when i click my buttons it just links to images/gym1.jpg and shows the picture as an external link. As in another web browser when really i want clicking the button to result in lightbox coming up as it does with the text

This is how my text is laid out
<a href="images/gym1.jpg" rel="lightbox[roadtrip]">Facility 1</a>
<a href="images/gym2.jpg" rel="lightbox[roadtrip]">Facility 2</a>
<a href="images/gym3.jpg" rel="lightbox[roadtrip]">Facility 3</a>
<a href="images/gym4.jpg" rel="lightbox[roadtrip]">Facility 4</a>
<a href="images/gym5.jpg" rel="lightbox[roadtrip]">Facility 5</a>
<a href="images/gym6.jpg" rel="lightbox[roadtrip]">Facility 6</a>
<a href="images/gym8.jpg" rel="lightbox[roadtrip]">Facility 7</a>
<a href="images/gym9.jpg" rel="lightbox[roadtrip]">Facility 8</a>

I think i want each one to be linked to a button but thats just not happening .

Please help!!!


11-10-2008, 07:46 PM
Do you have a link to your site?

11-10-2008, 07:52 PM
no sorry, what code do you want from it?

im using dreamweaver 8 and fireworks 8 to make the buttons



11-10-2008, 08:11 PM
Just fixed it! Had to edit add to buttons the "lightbox" bit!

What a numpty

Thanks anyway

11-10-2008, 08:20 PM
I believe that may work with Lightbox 2.04, but probably not with earlier versions. In any case, it probably results in invalid HTML, something like:

<input type="button" href="some.jpg" rel="lightbox[roadtrip]">

The issue is that the href attribute isn't valid for an input tag (or a button tag, if that's what you used), perhaps the rel attribute isn't either. But it should at least work in some browsers, probably not in FF. Or maybe you just meant an image that looks like a button, that would be valid:

<a href="some.jpg" rel="lightbox[roadtrip]"><img src="some_tbn.jpg"></a>