Is there a way to set the lightbox frame to a fixed width and height

Thanks

Marcel

Comments

chaloum’s picture

Bump

Does anyone know how to do this?

thanks

chaloum’s picture

bump

Moloc’s picture

Status: Active » Fixed

There is no User Interface, to configure that.

If you still like to configure that, you need to modify the media_gallery source (Note: If you install a newer release of media_gallery, your changes will be lost.).

colorbox-display.js in the media_gallery module:
find: innerWidth: 'auto',
replace it with:

innerWidth: '800px',
innerHeight: '600px',

and replace

  38         onComplete: function () {
  39           $(this).colorbox.resize();
  40         }

with

   38         onComplete: function () {
  39           $(this).colorbox.resize( {innerWidth:'800px', innerHeight:'600px'});
  40         }

This should do, what you like.
If you like to configure that in a UI, you may wait, until such a feature gets commited (for example see #1053674: Integrate with colorbox module).
If this does not solve your problem, feel free to reopen the issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.