Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Rather than fixed width/height, is there any way to open a colorbox to 90% of a users browser screen height ?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#11 | colorbox-settings.png | 19.72 KB | paskainos |
Comments
Comment #1
rolandk CreditAttribution: rolandk commentedHi,
Just to clarify further - how can I open a colorbox to 90% of a users browser screen height with elastic transition please.
Thank you
Comment #2
frjo CreditAttribution: frjo commentedUse "maxWidth" and "maxHeight". With Colorbox load you can set them with url queries. For standard Colorbox there are setting in the Colorbox configuration page.
Comment #3
rolandk CreditAttribution: rolandk commentedI am not sure where to find the colorbox config page - it was not in the drupal mod. Also the readme file did not have seem to have code samples.
Please can you post a sample for the above ?
The only samples I have found is http://colorpowered.com/colorbox/core/example1/index.html and I am not sure how to make this work for drupal.
Do you have a complete set of coding samples that shows how to call Colorbox for urls, html, videos, flash as well as other options ?
Thanks
Comment #4
frjo CreditAttribution: frjo commentedColorbox configurations is at "admin/config/media/colorbox". Just click "Configuration" and then you find the Colorbox link in the media section.
Comment #5
rolandk CreditAttribution: rolandk commentedThanks, I was able to set the default colorbox to 90% at "admin/config/media/colorbox".
The call to open a url or in colorbox overrides the defaults...
How do I correctly format the above call so that the default set colorbox 90% height fires properly ?
Comment #6
frjo CreditAttribution: frjo commentedI believe I misread your question. You don't want to limit the size, you want to force it to 90%.
If that is the case it's the standard width and height you should use.
You need to urlencode the % sign so it becomes "%25" like in the example above.
The "maxWidth" and "maxHeight" is to limit the Colorbox to the specified values.
Comment #7
rolandk CreditAttribution: rolandk commentedThanks so much - I would never have figured out the urlencoding:
I really think fans of colorbox would love a simple code samples readme to show how to open urls, html, youtube, flash, vimeo in colorbox witn different options like transitions, title, etc.
Thanks for the user support on colorbox.
Comment #8
viny-1 CreditAttribution: viny-1 commentedHi,
I have no CSS background at all (I know I will have to fix that soon), could you tell me what file I need to update in order to have this link automatically added for my node link: Open video.
Thanks a lot.
Comment #9
lsolesen CreditAttribution: lsolesen commented@rolandk Could you supply some documentation for the issues you mention. That would help out the maintainers immensely.
Comment #11
paskainos CreditAttribution: paskainos commentedIf I understand the question correctly, the answer is quite simple - and already built in to the Colorbox module UI. On the Colorbox plugin settings page (
admin/config/media/colorbox
) under 'Styles and options' » 'Options' select the 'Custom' radio button which will reveal several customizable options, including Max width and Max height. See the attached image for visual reference.Comment #12
kopeboy CreditAttribution: kopeboy as a volunteer commentedThat doesn't work with the Colorbox trigger field :(
I mean, the colorbox is limited, but the image isn't, so it's scrollable (even if in the settings I've set scrollable OFF).
Comment #13
bcobin CreditAttribution: bcobin commented@kopeboy,
Did you ever find a solution for this? Running into the same issue on tablet/mobile. Thanks!