Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
195
rated 0 times [  199] [ 4]  / answers: 1 / hits: 15512  / 15 Years ago, thu, january 21, 2010, 12:00:00

I am able to create an iframe which occupies entire screen. But I am not able to make the contents of the background hidden, In other words, I want an iframe which is opaque. I am currently trying like this:



   <iframe name='myifrmae' allowtransparency = 'false' background= '#FFFFFF' id = 'myiframe' src = 'main.html' 
style='position:absolute; top:0px; left:0px; width:400px;
height:100%;z-index:999' onload = 'sendParams();'' frameborder='no'>
</iframe>


I am testing this on Firefox/3.5.6.



Am I doing anything wrong here?



UPDATE:
I gave a BGCOLOR = #FFFFFF to main.html body, Now it is working fine. Thanks for your inputs!


More From » ajax

 Answers
23

Try:



<iframe name='myiframe' id='myiframe' src='main.html' 
style='position:absolute; top:0px; left:0px; width:100%; height:100%;
z-index:999' onload='sendParams();' frameborder='no'>
</iframe>


You don't need to set allowtransparency=false as this is the default. Also there were a few errors with extra quotes. Also I've corrected the spelling the name attribute.



I've changed the width to be 100% instead of the fixed width of 400 pixels to make sure that it fills the entire window.


[#97779] Monday, January 18, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
admin

Total Points: 468
Total Questions: 103
Total Answers: 103

Location: Equatorial Guinea
Member since Sun, Feb 14, 2021
3 Years ago
;