391 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
EugeneO says

Does anyone know how to align pretty photo so it opens centred on a page with a horizontal scrollbar?

From what I can see there is a function _center_overlay() on line 616 which should be doing it. It is returning the correct Xoffset value but it does not center the lightbox when it opens.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

Can you post some of the code, or do a fiddle ?

391 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
EugeneO says

I’m using prettyPhoto 3.0.1.

http://jsfiddle.net/5KYx2/

I have been poking at it for a while and managed to get it working in Chrome but the fix didn’t work with Firefox 3.6 or IE 7 / 8.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

So as an example: http://danieldau.com/prettyphoto/

Looking at that link, what would you like to achieve ?

391 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
EugeneO says

If you scroll along the page to “MC and UPB ” and then click one of lightbox links the lightbox opens but it is not centred on the area of the page you have scrolled to. If you then scroll the page to the right or left the lightbox window position is updated and it is then centred.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says
391 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
EugeneO says

I came across that solution before and it does fix the horizontal scrolling problem but it creates problems with vertical scrolling instead. Maybe I’ll just use different css files for different layouts.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

I came across that solution before and it does fix the horizontal scrolling problem but it creates problems with vertical scrolling instead.

Have you thought of using colorbox ?

Or similar. Without seeing your site link, its a case of stabbing in the dark. We use a vertical auto scroll using “scrollto” but never used modal window popups with it.

My guess is if each frame ( div ) is formatted correctly, then the issue seems to be to set auto centering of the modal relative to that slide.

Not an easy option I suppose, but you can force modals to center.

Look at Evolution ( search for it on codecanyon )

We use that, and no matter how we try , it always centers. Perhaps theres a trick or two in that you can utilise

391 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
EugeneO says

I wanted to stick with prettyPhoto because I know it is very easy to integrate with WordPress with no fuss but I might look at some other lightboxes to see what alternatives there are. For now the extra stylesheet, or even inline styling, on the horizontal layouts are probably the simplest solution.

Thanks a lot for you help SportTipsWorld. I’ll continue to look into it and see what I can do.

5492 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Located in Australia
  • Has sold $1,000+ on Envato Market
+4 more
Australia says

I wanted to stick with prettyPhoto because I know it is very easy to integrate with WordPress with no fuss but I might look at some other lightboxes to see what alternatives there are. For now the extra stylesheet, or even inline styling, on the horizontal layouts are probably the simplest solution. Thanks a lot for you help SportTipsWorld. I’ll continue to look into it and see what I can do.

More often than not, its js or css causing the issue.

Many people have similar issue, its a case of thrashing it out reverse coding.

http://stackoverflow.com/questions/2632746/horizontally-and-vertically-center-modal-div-ie-issue

by
by
by
by
by
by