Closed (fixed)
Project:
Colorbox
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2011 at 03:08 UTC
Updated:
24 Jun 2012 at 11:12 UTC
I mainly use colorbox to display groups of images at full-size, so I have set the maximum width and height settings to blank on the configuration page.
I have 1 page, however, where I would like the images to scale to 100% of the browser window. How would I do this?
So far, I have been trying to do it using the height and width options like this:
<a href="img.jpg?width='100%'&height='100%'" class="colorbox" rel="image_group"></a>
or
<a href="img.jpg?width=100%&height=100%" class="colorbox" rel="image_group"></a>
Comments
Comment #1
frjo commentedEnable "Colorbox load" in the configurations and then change the class from "colorbox" to "colorbox-load".
Comment #2
max6166 commentedThank you, frjo.
The height and width values did work after I changed to colorbox-load, but I also realized that I had chosen the wrong behaviour.
What I would like is for the images on just 1 page to scale to fit in the browser window. I think the parameters for this actually are:
Unfortunately, this doesn't seem to work with "colorbox-load". Any help would be appreciated.
Comment #3
frjo commentedCheck out this patch https://drupal.org/node/1161342#comment-4489300. It will allow any parameter so should fix your problem.
If it works well for you I will commit it to 7-dev.
Comment #4
max6166 commentedThank you very much, frjo! The parameters patch fixed everything!
Comment #5
lsolesen commented