Lightbox / Webkit Issue
- Started
- Last post
- 17 Responses
- besler
I've got a lightbox activated on a page that has roughly 8 or so images, but in Webkit browsers (Safari, Chrome), the modal window does not change with your positioning on the screen.
Example: http://spacemanspiff.net/cleo/de…
Scroll down to one of the last images, and you'll see that the modal window appears at the top of the page. In Firefox (and IE, surprisingly), this isn't an issue.
Does anyone know of how to get around this?
- besler0
Anyone?
- welded0
Take a look at this (somewhat old) bug report:
https://bugs.webkit.org/show_bug…It makes some sense based on what's happening. Try using jQuery with $(document).height() or something like that instead.
- Damn just tracked that down myself and was feeling great about my leet js debuggingzray
- welded0
Er, wait, not $(document).height(). I don't know why I thought that would help. Check out comment 12 from that bug report:
https://bugs.webkit.org/show_bug…
- welded0
Perhaps: http://api.jquery.com/scrollTop/…
- zray0
or just use http://jquery.com/demo/thickbox/…
- besler0
If possible, I'd like to stay with the same lightbox js solution...for a few different reasons.
- welded0
Out of curiosity, what reasons are those?
- 1) Don't know JQuery like I should (yet)
2) Don't really wanna start from scratch if possiblebesler - Seems to me both of those reasons suggest you simply go with an existing lightbox. Isn't the one you have custom?welded
- It's a highly modified version of Lightbox JS2. I didn't do the initial programming on it, but I am now...besler
- Reminder. Spring break = Learning JQuerybesler
- 1) Don't know JQuery like I should (yet)
- zarkonite0
Switch to shadowbox?
- besler0
One more question; any idea why on http://spacemanspiff.net/cleo/ha…, the anchor links don't line up properly? The left nav works fine locally, but it jumps down about two full lines when on the server. I'm guessing it's something to do with the header, just not sure what.
Any ideas would be appreciated.
- besler0
Anyone?
- bigtrickagain0
i'm guessing that if you stick your anchor inside those floating nav-box divs, it will work like you want it to. give that a try?
- besler0
Nope, actually made it go down even further.
- crud.bigtrickagain
- Haha, any other ideas? I've tried removing overflow from CSS properties to no avail either.besler
- besler0
Anyone else?
- bigtrickagain0
i see now. using firebug, it looks like you're neglecting to close some of your <divs> - the ones that look like this:
<div style="clear:both; margin:0 auto; width:800px;">
lack closing </div> tags.you should get this:
http://getfirebug.com/
it will save you heaps of time!
- welded0
The named anchors are working like they should. The problem is that you need to clear another 100px or so because of the fixed header. That means your anchors need this amount of space between them and the clickable links below.
- besler0
Got it! Had to add the following to the anchors:
style="position: absolute; margin-top:-100px;"