I know this couldn't be the most appropriate forum to ask, but I didn't find a colorbox support forum. Every eventual help will be appreciated.
In my zenphoto site I have to open the image in an openbox window, with 80% screen width and height size; however every image must have the (ugly and bad, I know) facebook plugin on its side, so I have to open an iframe that contains the image.php (that I have full rewritten). The problem is that I have to resize the image to fit the colorbox iframe, even in the height: the actual solution is to use a javascript that resize the image object in the DOM after the page is loaded, checking the window size.
This is a bad idea, because every image is resized before being loaded and produce an ugly and laggy effect to the user, but is the only one I've found.
A good idea would be to pass the dimension of the `div id="cboxLoadedContent"` with a GET to the iframed page when loaded. So the problem is: how to get the informations needed? The box is created only onclick, so the data must be read at that moment, on the fly.
I found this interesting post on drupal forum, but drupal uses its own colorbox load module... any idea to implement this into zenphoto?
http://drupal.org/node/1716938Thanks
Comments
But actually I would suggest to go the responsive route doing this via CSS (I assume you know about "responsive webdesign") since the colorbox size is dependent on the browser window. And the iFrame itself is actually another browser window.
I always searched the entire net for a CSS function for that and never found a solution, I was sure it couldn't be done with CSS, so I found this complicated way.
Today I searched again and found the simple CSS rule `height:100%` working, I thought it had another function... probably I confused it with the html property `height="100%"`. I have no words.
There is always a simpler way. Always. lol
Thank you.