Closed (cannot reproduce)
Project:
Colorbox
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2010 at 14:29 UTC
Updated:
9 Apr 2020 at 13:15 UTC
Jump to comment: Most recent
Comments
Comment #1
zmove commented+1 for that. the colorbox width seems to be hardcoded in a style="" element for the colorbox wrapper.
It would be great to have an admin option to put our own value.
Regards,
Alex
Comment #2
melaniepike commentedYes! Any luck on figuring out the fixed width box like example 3?? Maybe there is a way to do this in CSS?
Thanks!
Comment #3
latulipeblanche commentedChanged the issue to D7.
But the question is still the same.
How can we get the fixed width like on the demosite : http://jacklmoore.com/colorbox/
"No Transition + fixed width and height (75% of screen size)"
Comment #4
Anonymous (not verified) commentedIs there an answer to this yet?
Thanks
Comment #5
enzipher commentedIt might depend on implementation, but you should be able to use the settings from the example page, e.g.
Add the above in a *.js file and the settings should take effect, alternatively you can add the code in your template.php file using drupal_add_js(). Something along the lines of:
Cheers,
Comment #6
jobe12 commented@enzipher
i tried to use your solution, but it did not change anything.
Any other idea?
thanks
Comment #7
Bensbury commentedNot sure if this helps (I'm trying to make colorbox responsive) but you can pass % with '%25' as the escape character, as well as set a maxWidth.
Japan Office
NB - Using colorbox node by the way, but it's the same.
Comment #8
michielkenis commentedComment #5 solved my issue. Just make sure you replace the ".group3" into the class you used.
Comment #9
bellagio commentedi'm using colobox with insert
http://drupal.org/project/insertMy class is colorbox rel is colorbox.
i added this code to template.php
drupal_add_js('$(".colorbox").colorbox({rel:"colorbox", transition:"none", width:"75%", height:"75%"});');to see if this code is working for me, but nothing is changed.
And my source code shows
<script type="text/javascript" src="/drupal/$(".colorbox").colorbox({rel:"colorbox", transition:"none", width:"75%", height:"75%"});?h"></script>Could you kindly share how you made it work? Thank you.
Comment #10
enzipher commented@bellagio You must add the
inlineparameter for it to work, otherwise the function is looking for an external file.Cheers,
Comment #11
bellagio commentedThank you enzipher.
i added 'inline' but no change. i'm using drupal 6. i guess this code is good for 7 only?
Comment #12
swortis commentedNot sure this was really answered.
If a user is creating a View with this module how would he/she get a fixed width box to launch?
Comment #13
neslee canil pinto