I have an iframe, but when I set it to height="100%", why does it do this?
http://trasion.com/forums.php
When I set it to like "1000", it goes 1000px high, but 100% doesn't work? (neither does "auto")
How can I make it fit exactly in the frame?
Printable View
I have an iframe, but when I set it to height="100%", why does it do this?
http://trasion.com/forums.php
When I set it to like "1000", it goes 1000px high, but 100% doesn't work? (neither does "auto")
How can I make it fit exactly in the frame?
This works for me with css:
EDIT: i winwin from eliteCode:.iframe {
width:100%; /* or whatever */
min-height: 100%;
height:auto !important; /* for modern browsers */
height:100%; /* for IE */
}
style="height:auto;" or something?
EDIT:
Damn man u beat me to it :P:
Lol at IE seperated from modern browsers :3
Made it worse.. http://trasion.com/forums.php
edit: //
do i need to add something to my code:
<IFRAME SRC="forum/index.php" frameborder="0">
You cannot view frames, please get a new browser. Try using Mozilla Firefox, or Internet Explorer.
</IFRAME>
?
Don't use Iframes, use divs instead.
My choice is iframes.. but if you tell me how to use divs, I can. I just don't understand them.
I'm looking for help with the iframes though.
I remember a site called HTMLDogs had some DIV examples. I learnt alot from it's source.
You can just use PHP includes with divs maybe?
Could you just help me do what I need with iframes?
Quote:
Made it worse.. http://trasion.com/forums.php
edit: //
do i need to add something to my code:
<IFRAME SRC="forum/index.php" frameborder="0">
You cannot view frames, please get a new browser. Try using Mozilla Firefox, or Internet Explorer.
</IFRAME>
?
I'm guess your problem has been resolved?
He just added
PHP Code:<IFRAME SRC="forum/index.php" frameborder="0" HEIGHT=1200 WIDTH=868>
You cannot view frames, please get a new browser. Try using Mozilla Firefox, or Internet Explorer.
</IFRAME>
I'm not making it full screen... It's to fit inside the layout on the site.
edit: lol, I got an infraction? bull shit . =/
browsers load the body object and size the body object differently. In any gecko or mozilla based browser, the body object's height is only as big as the content requires it to be.
You'll have to tell the browser to make the body object the same height as the inner height of the client BEFORE you put the height for the iframe, this can either be done in HTML or CSS, but regardless of which you use, you have to make sure body height is specified BEFORE iframe height or it wont work in all browsers.
Never use like this: height=1200, you should put: height=1200px, you should put the unit unless it is 0(which mean 0 in any unit).
To use div, you can use ajax, its not that hard and looks good. I also have a script that resizes the iframe according to the iframe containt, so if you click a link that resizes content to a small size, it resizes the iframe too.(the script is simple to "install", if you dont want to learn ajax and modify almost all your files, it would be the best).
Which one you like? Ajax or iframe with the resize thing?
In CSS, use <nr>px. In a normal HTML tag, height=1200 is fine. height=1200px is wrong for that.
Oh yes ofcourse you need quotes. I just typed in a hurry =]