-
CSS + iFrame?
Code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<STYLE type="text/css">
BODY { height: 8.5in }
#header {
position: fixed;
width: 100%;
height: 15%;
top: 0;
right: 0;
bottom: auto;
left: 0;
border: 0;
}
</STYLE>
</HEAD>
<BODY>
<DIV id="header">
<IFRAME SRC=http://www.google.com>
</DIV>
</BODY>
</HTML>
The code seems pretty simple, I just want to apply the defined CSS format to an iFrame, but for some reason it doesn't work. Any ideas why?
Thank
-
hi
try using it this way
<iframe src="dfsgfdg" CLASS="YourClass">
-
Still didn't work, thanks though ;) :confused:
-
hi
Where are u trying to apply the class - on google's page?
If that is the case- that wont be possible,but if you want to change the style of your iframe then it would work.
-
hi
I want to apply absolute positioning to the iframe, not to googles page.
Thanks
-
hi
Shd have mentioned it.
before try this:
Code:
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 283px; top: 260px">
<iframe src="http://www.google.com" rows="5" cols="40"></iframe>
</div>
-
iFrames are the most demented things in the world... If memory serves me CSS doesn't like iFrames but I could be wrong.. I had no end of troubles trying to get it to work.. In the end I used some ASP to get the damn thing to work I think...
May I ask why you are using an iFrame?