September 2nd, 2002, 06:20 AM
IFrames and CSS
I am have problems with the Iframe control.
I have a iframe, in the iframe is a page with some controls on. Now what i want to do is hide this iframe, I do this by using the css atribute visibility: hidden; I hide a div that surrounds the iframe. What hapens is that the iframe disapears and all the contents, but any controls in the iframe remain visable.
Now if i take all the controls out of the form and try again, it works fine everything disapears.
I have attached an example in a zip file, there is a pge with an iframe and a button, the iframe contents is google.com when you click the hide button you can see the problems
Any help would be aprecated. Thanks
September 2nd, 2002, 07:51 AM
which browser are you testing in
camsoft...which browser are you looking at this is in as i have looked in IE 5.00 and works fine....this may indicate where your solution lies...
September 2nd, 2002, 07:53 AM
September 2nd, 2002, 10:42 AM
Here is a different method:
<div id="I_Leaders" name="I_Leaders">
<iframe id="iframe1" class="InlineBdr" width="600" height="200" border="0" frameborder="no" src="http://www.google.com"></iframe>
<input onclick="hide('I_Leaders')" type="button" value="Hide Inline Frame">
September 2nd, 2002, 04:48 PM
You could also try setting the height and width of the iframe to 0, or set the display property to none.
September 3rd, 2002, 09:10 AM
Thanks for your help, this solution work very well.