|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IFrames and CSS
Hi
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 |
|
#2
|
|||
|
|||
|
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...
|
|
#3
|
|||
|
|||
|
IE6 and I Think IE 5.5
|
|
#4
|
|||
|
|||
|
Here is a different method:
<script> function hide(el) { document.getElementById(el).style.visibility='hidden'; } </script> </head> <body> <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> </div> <input onclick="hide('I_Leaders')" type="button" value="Hide Inline Frame"> |
|
#5
|
|||
|
|||
|
You could also try setting the height and width of the iframe to 0, or set the display property to none.
|
|
#6
|
|||
|
|||
|
Thanks for your help, this solution work very well.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > IFrames and CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|