Rounded corners with modal .. hacked !!

Ive been working on a few hacks and tweaks for Control.Modal over the past 2 days or so. the main one being a way to set a model window size on load of the iframe.

Its not the best hack in the world but it works!!

Basically you need to edit the modal.js file and change the default iframe template adding ' allowtransparency="true" ' and give your css attribute of

body { background-color: transparent; }

then inside the iframe set a div with an id (not really necessary) and give it width and height (as long as it was called with a greater height than the height and width attributes of the fore mentioned div it will render the page as a transparent background (dont forget to give the div a background color!!!!

Of course this plays about with Click away from modal window to close it .. but in my situation i allways have a toolbar on the frame anyway with a close button and i turn off click away from frame to close (not for everybody i know but its a hack for me !!!!)

ive been playing with niftycube to get rounded edges to the div and have done it successfully my new open control.modal iframes now are fluid (according to the div width and height -- i hope fluid is the right word !!) and have rounded corners around the whole thing making it look like a nice rounded box that appears

Will update with more when ive finished

/Jester

Posted June 20th, 2007 at 5:04am by jester

Sounds nice, can we get a screenshot? :)

Posted June 21st, 2007 at 5:58am by bbodien

Login or Register to Post