Can I set an iframe to fill all available space? Like height="*"?
Michael
Can I set an iframe to fill all available space? Like height="*"?
Michael
I don't know how well supported it is, but in IE6, this works:
Code:<iframe style="height: 100%; width: 100%;"></iframe>
Does that tell it to be 100% of the container (in this case the page) or to fill the available space? I think it is the first one cos its going off the page now.
:D
It doesn't go off the page for me, man. Do you have it nested in another tag, like a <div>?
No but I have something above it. This code:
will give it exactly 50px of scroll bar.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<img src="filler" height="50">
<iframe style="height: 100%; width: 100%;"></iframe>
</BODY>
</HTML>
oh. damn :(
yup :(
I did workaround the problem with the page i was having this time but would like to know in the future so I can get away from framsets
have you tried nesting it in a div and setting width and height to 100%?
Also, replace <img src="filler" height="50"> with a div, it should speed up rendering. <div style="width:100%; height:50%;">
nesting didn't work :)
Sorry to be dense but I don't understand what you mean about the image.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<img src="filler" height="50">
<div style="height: 100%; width: 100%;">
<iframe style="height: 100%; width: 100%;"></iframe>
</div>
</BODY>
</HTML>
Try this:
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<div style="height: 100%; width: 100%;">
<div style="height:50%; width:100%;"></div>
<iframe style="height: 50%; width: 100%;"></iframe>
</div>
</BODY>
</HTML>
that dosen't give scrollbars because the totals equal 100%. The situation I have is that the page is completely dynamic based on querystring perameters [sic]. The way it is now is, sometimes I have a graphic heading (different ones of different sizes) and sometimes not, then a frame that is a fixed size, then a frame that I need as big as possible but I never know how much room I have. thats why I am using frames now cos of the "*" feature but it still isn't what I want.
thanks
Michael
umm.m... dont use 'style'. I dont.
Just use <Iframe src="whatever" width="100%" height="100%">
lol works ok on my site, Mike. You just helped me with it :)
James
Still doesn't work.Quote:
Originally posted by jamieoboth
umm.m... dont use 'style'. I dont.
Just use <Iframe src="whatever" width="100%" height="100%">
lol works ok on my site, Mike. You just helped me with it :)
James
Just because you practice bad coding standards doesn't mean that others should as well. Try running that code through a validator and see what happens.Quote:
Originally posted by jamieoboth
umm.m... dont use 'style'. I dont.
lol fine. It was just a suggestion mate... jesus....
try using the following code in your <body> tag:
it will stop IE adding its margin to the page :)Code:topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0"
and hopefully make the width & height propa
still wont work :)
No need to bring religion into this.Quote:
Originally posted by jamieoboth
lol fine. It was just a suggestion mate... jesus....
Would you tell a man building a house to use Elmer's Glue when he can't find nails? If you're a lunatic, maybe. So don't tell someone to use bad coding practices either. :)
You probably don't want tables as your answer, but I think this is valid HTML. I've only tried it in IE 5.5, though:
Code:<html>
<head>
<title>blah</title>
</head>
<body>
<table style="border: 1px solid black; width: 100%; height: 100%;">
<tr>
<td><img src="filler" height="120"></td>
</tr>
<tr>
<td style="height: 100%;">
<iframe src="blah" style="width: 100%; height: 100%;"></iframe>
</td>
</tr>
</table>
</body>
</html>
Whatever works... and that worked :) Thanks!Quote:
Originally posted by The Hobo
You probably don't want tables as your answer...
nuva idea:
I checked my site on an html validator, and topmargin="0" etc, wasn't HTML 4.01 Traditional "Valid"
So i changed it to:
<body style="margin: 0px;">
and dats Valid HTML,
So try that :)
Like:
Note: This is the way it shud b set out, u can add more Meta Tag's etc, but u shud really have the content-type 1 and the DOCTYPE header :)Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>This is my page title</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</head>
<body style="margin: 0px;">
<iframe frameborder="0" style="width:100%; height:100%;" src="myPage.html" name="CommentsFrame"></iframe>
</body>
</html>
Quote:
Originally posted by The Hobo
No need to bring religion into this.
Would you tell a man building a house to use Elmer's Glue when he can't find nails? If you're a lunatic, maybe.
Yes. And yes. Look at the smiling face. Theres no way it could be THAT happy without something being wrong.... Elmers glue? :|
Try no more nails. lol....
Try posting after you've sobered up. You'll make more sense that way.Quote:
Originally posted by jamieoboth
Yes. And yes. Look at the smiling face. Theres no way it could be THAT happy without something being wrong.... Elmers glue? :|
Try no more nails. lol....
You could also do:
<html>
<head>
<title>Title</title>
</head>
<body style="margin:0px;">
<div style="height:100%;width:100%;">
<img src="filler.ext" height="50">
<div style="height:100%;width:100%;">
<iframe width="100%" height="100%">
</div>
</div>
</body>
</html>
That will probably work.
nope :)Quote:
Originally posted by Zach Elfers
You could also do:
<html>
<head>
<title>Title</title>
</head>
<body style="margin:0px;">
<div style="height:100%;width:100%;">
<img src="filler.ext" height="50">
<div style="height:100%;width:100%;">
<iframe width="100%" height="100%">
</div>
</div>
</body>
</html>
That will probably work.