I used color box in my set up of this module and it works great except that the lightbox sidescrolls. I went to getdirectsion/location/to and used CSS to control the width of the page to 600px. However, when I load the colorbox, it still sidescrolls. Is there a way to control this?

Thanks,
Rebecca

Comments

hutch’s picture

Copy getdirections_box.tpl.php to your theme's folder and edit it there, you will see a <style> section which needs to be changed.

beckyjohnson’s picture

OK I did this and it didn't work. I changed the widths to 500px on each class, cleared my cache and ...well nothing.
My iframe is 600 px wide, so there should be enough room.

hutch’s picture

OK, It's been a while since I wrote this code, have a look at README.txt from about line 65 onwards, there should be enough there to help figure it out.

beckyjohnson’s picture

hhmmmm so I wrote my url like this:

<a href="/getdirections_box/location/to/[nid]?width=500&height=600&iframe=true" class="colorbox-load">Click here to get directions to [title]</a>

I read the readme file several times and several times before I posted here. I have adjusted the width..what else is there besides this and the tpl file?

Sorry, I don't mean to pester, I'm just getting frustrated.

hutch’s picture

The width set in the .tpl must be less than the width in the link, about 40 - 50 px less. Make sure you flush the cache. You also should set 'enable colorbox load' in Colorbox config. Adding a html comment to the .tpl file helps you check that it is being used by your theme, open the colorbox and View the Iframe source, this works in Firefox. I have just tested this and it is working for me using Genesis theme.

beckyjohnson’s picture

OK! That works. Thank you for the tip. I also realized this works in FF but not in Safari. But thanks! I think it will be ok.