Does anybody know how to get a PrettyPhoto modal window to show up in the centre of the screen instead of the centre of the page?

478 posts
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Located in United States
+2 more

I’m having some trouble with PrettyPhoto (within WooCommerce). When I click to show the image in a modal window, it appears in the centre of the page instead of the centre of the screen.

This means that on long pages, it is there, but I have to scroll down to see it, so those using my site who don’t know that end up thinking nothing is happening.

I thought it would be a case of writing some CSS, but either it doesn’t work or I can’t figure out the correct CSS element to use.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes