PDA

View Full Version : Prev/Next mouse hover on Lightbox 2.03a



thulasa
04-29-2008, 03:48 PM
Hi everybody... I hope it's a new question about the marvelous lightbox... If not please pardon me...

http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

So...
Anyone know if there is any possibility to have the "on mouse hover" property only near the buttons (next/prev) and not in all the left or right portion of the image?

I think the solution is in the attribute "hoverNav" (from line 291 file lightbox.js).

Many thanks.
:D

jscheuer1
04-30-2008, 05:23 AM
That will make that feature much harder for the uninitiated user to discover (it is already a little hard to find for folks unfamiliar with lightbox). But, if you insist - Edit lightbox.css not lightbox.js. Here in lightbox.css (changes/additions red):


#hoverNav{
position: absolute;
top: 0;
left: 0;
height: 100px;
width: 100%;
overflow:hidden;
z-index: 10;
}
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}

#prevLink, #nextLink{
width: 100px;
height: 100%;
background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}

thulasa
05-02-2008, 04:04 PM
Suuuuuure...
Why I didn't search here first...

Sure sure sure...

And so...
If you use images prev.gif and next.gif you/we can best use this values:

For #hoverNav
120 px height

For prev/nextLink 70px width.

Many many thanks to you!