Thanks for all the suggestions.
I may be missing something, but I have not managed to get height: auto;
width: auto to work. From trawling around the web, the consensus seems to
be that dynamic resizing of iframes can only be done with JavaScript and
not CSS only.
So, for the moment, I'll probably 'throw-the-kitchen-sink' at this and
combine elements from the other suggestions, that is:
Use a minimum JSmol object size of around 400 px to give enough room to at
least drag the popup menu around.
Position the JSmol object, top-left in the iframe with some 'padding'
(content) to the right and bottom to give a little more room for the popup
menu. I typically place any custom controls in the iframe and under the
JSmol object, anyway.
Use a menu line-height CSS of 0.9 or 0.8 to reduce the menu-height (to 90%
or 80%!) without impacting readability/usability too much.
I'll certainly look into the smaller custom menus as outlined in:
http://wiki.jmol.org/index.php/Recycling_Corner#Custom_pop-up_menus.
The SimpleChem and SimpleBio custom menus look pretty good and I'll perhaps
work on a SimpleCryst menu to display unit cell arrays, polyhedra etc.
Perhaps use these by default for, say, .mol, .pdb and .cif files,
respectively.
In case it helps anyone else tinkering with iframes. I'm doing all this in
a single (PHP) file using the iframe srcdoc attribute for the iframe
content including JSmol. Works for most up-to-date HTML5-capable browsers
(Firefox,Chrome, Safari and Opera). Even works for IE with a
srcdoc-polyfill:
https://github.com/jugglinmike/srcdoc-polyfill
Thanks again
Geoff
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users