Title: Change popup window size
Last modified: August 19, 2016

---

# Change popup window size

 *  [drinkingsouls](https://wordpress.org/support/users/drinkingsouls/)
 * (@drinkingsouls)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-structuring-php/)
 * Hey,
    I am using the gallery plugin Lazyest Gallery and I’m wanting to mod the
   width of the popup window generated. Here is the popup window code:
 * `resizable=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen
   =no,dependent=yes,width=" . $lg_gallery->get_option( 'pictwidth' ) . ",height
   =" . $lg_gallery->get_option( 'pictheight' ) . ",left=100,top=100'))";`
 * See where width and height are declared? It retrieves the image width and height
   and creates the popup window accordingly. How can I change this to add say 10px?
   I know it would be something like:
 * `height=" . $lg_gallery->get_option( 'pictheight' ) + 10px`
 * Could anybody give me a hand with this?
    Any help is greatly appreciated. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Marcel Brinkkemper](https://wordpress.org/support/users/macbrink/)
 * (@macbrink)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-structuring-php/#post-1640552)
 * your can do something like this:
    create a new variable `$myheight = (int)$lg_gallery-
   >get_option( 'pictheight' ) + 10;` and in de popup window code put `height=" .
   $myheight . "`
 *  Thread Starter [drinkingsouls](https://wordpress.org/support/users/drinkingsouls/)
 * (@drinkingsouls)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-structuring-php/#post-1640642)
 * Hey, thanks for the reply. Your solution is semi-functional. When the popup window
   opens it opens with the dimensions I specified, but as soon as the image has 
   loaded the popup window is re-sized to fit around the image again. Any ideas 
   on how to prevent this?
 * The reason I have this problem in the first place is because I needed scroll 
   bars on some of my images. Ideally, the script would check if popup was larger
   than the screen res and apply scroll bars if it was.
 * An easier way I thought would be to just add scrollbars=yes to the popup function,
   which worked, but it inserted the scrollbars on the inside of the window so they
   took up space. Now I’m trying to add on the width of the scrollbar to try and
   prevent them from showing when they don’t need too. Does that make sense?.
 * Thanks
 *  [Marcel Brinkkemper](https://wordpress.org/support/users/macbrink/)
 * (@macbrink)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-structuring-php/#post-1640685)
 * IC,
    please have a look at lazyest-popup.php. in the function FitPic:
 * `iHeight = document.images[0].height - iHeight + 10;`

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change popup window size’ is closed to new replies.

## Tags

 * [Get_Option](https://wordpress.org/support/topic-tag/get_option/)
 * [popup](https://wordpress.org/support/topic-tag/popup/)

 * 3 replies
 * 2 participants
 * Last reply from: [Marcel Brinkkemper](https://wordpress.org/support/users/macbrink/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/help-structuring-php/#post-1640685)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
