Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
How can we create a fixed width box like in the examples at http://colorpowered.com where the box is 75% of the screen resolution? Also is it possible to get that option included on the settings page?
Thank you.
Comments
Comment #1
zmove CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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) CreditAttribution: Anonymous commentedIs there an answer to this yet?
Thanks
Comment #5
enzipher CreditAttribution: 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 CreditAttribution: jobe12 commented@enzipher
i tried to use your solution, but it did not change anything.
Any other idea?
thanks
Comment #7
Bensbury CreditAttribution: 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 CreditAttribution: michielkenis commentedComment #5 solved my issue. Just make sure you replace the ".group3" into the class you used.
Comment #9
bellagio CreditAttribution: bellagio commentedi'm using colobox with insert
http://drupal.org/project/insert
My 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 CreditAttribution: enzipher commented@bellagio You must add the
inline
parameter for it to work, otherwise the function is looking for an external file.Cheers,
Comment #11
bellagio CreditAttribution: 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 CreditAttribution: 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