|
Re: [jQuery] Greybox Redux (Reworked) (Demo): msg#01221lang.javascript.jquery
Erin Doak schrieb: > I like your work. Here are a few suggestions. > > If the link to activate the greybox is near the bottom of the page and the > page had to be scrolled to show the link, the greybox will appear not in the > middle of the visible window but back up near the top. > > If the page has scrollbars and the user scrolls the page while the greybox is > visible the overlay is shown to not cover the entire page. > > A horizontal scroll bar appears in FF. > > If the page is scrolled with the greybox visible the greybox does not > recenter itself. I solved that for my lightbox very simply. Most greybox/lightbox solutions center the box dynamically, i.e. it has to be recentered on scroll and resize. That's clumsy. Simply use a fixed positioning and you can get rid of the event handlers completely. Example: .greybox { position: fixed; top: 50%; left: 50%; } You then only need to push the box half of its width and height to the left/top via negative margin. This needs to be done via JavaScript if these values are dynamic, i.e. in the show/positioning function. IE6 needs extra care, but you can emulate the fixed positioning with dynamic properties. I have posted a complete solution a while ago here, if you are interested... -- Klaus
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [jQuery] Possible changes to hide/show, Klaus Hartl |
|---|---|
| Next by Date: | Re: [jQuery] Greybox Redux (Reworked) (Demo), Benjamin Yu |
| Previous by Thread: | Re: [jQuery] Greybox Redux (Reworked) (Demo), Erin Doak |
| Next by Thread: | Re: [jQuery] Greybox Redux (Reworked) (Demo), Benjamin Yu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |