title: How to fix the width and height of jquery lightbox?
body: <p>I have aplied jquery lighbox on my image gallery, but due to the variable size of images, the lightbox size is not fixed hence opens up with image's original size, this in turn causes the biga images to go out of screen and display horizontal scroll bar in browser.</p>
  
  <p>Hence I am looking for the way to apply the fix width and height to lightbox so that every image must be displayed with this size in lightbox.</p>
  
  <p>Please help..</p>
  
  <blockquote>
    <p><strong>Update</strong></p>
  </blockquote>
  
  <p>i Just tried with the solution Scott (<a href="http://geekswithblogs.net/wojan/archive/2009/06/17/jquerylightbox.aspx" rel="nofollow">http://geekswithblogs.net/wojan/archive/2009/06/17/jquerylightbox.aspx</a>) has given to me, I did this,</p>
  
  <pre><code>function _resize_container_image_box(intImageWidth,intImageHeight) {
  // Get current width and height
  //rescale if necessary
  if((settings.maxWidth != null &amp;&amp; settings.maxHeight != null) &amp;&amp; (intImageWidth &gt; settings.maxWidth || intImageHeight &gt; settings.maxHeight)){
  var isWider = intImageWidth &gt; intImageHeight;//is the image wide or tall?
  var scale = isWider ? settings.maxWidth/intImageWidth : settings.maxHeight/intImageHeight;
  intImageWidth = intImageWidth * scale;
  intImageHeight = intImageHeight * scale;
  }
  
  $('#lightbox-image').height(intImageHeight); 
  $('#lightbox-image').width(intImageWidth); 
  var intCurrentWidth = $('#lightbox-container-image-box').width();
  var intCurrentHeight = $('#lightbox-container-image-box').height();
  // Get the width and height of the selected image plus the padding
  var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value
  var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value
  // Diferences
  var intDiffW = intCurrentWidth - intWidth;
  var intDiffH = intCurrentHeight - intHeight;
  // Perfomance the effect
  $('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
  if ( ( intDiffW == 0 ) &amp;&amp; ( intDiffH == 0 ) ) {
  if ( $.browser.msie ) {
  ___pause(250);
  } else {
  ___pause(100);  
  }
  } 
  $('#lightbox-container-image-data-box').css({ width: intImageWidth });
  $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
  };
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>$('#gallery a').lightBox( maxHeight: null,
  maxWidth: null);
  });
  </code></pre>
  
  <p>But whenever I do this and click on the image just gets open in browsers annother tab, all the lightbox functinalty fails</p>
  
  <p>Please help me to correct it</p>
  
  <p>Thanks</p>