Iframe

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
the iframe at http://ufo.jagf.net/forum.php don't want to change height whatever I do.

I use this:

HTML:
<iframe src ="/forum/index.php" width="100%" height="100%" frameborder="0"></iframe>
<center>Can't see the forums? <a href="forum/index.php">Click here!</a>

What should I do?
 

Hazirak

New Member
Messages
197
Reaction score
0
Points
0
Setting heights to 100% is a bit of a tricky business. The issue is that while common sense tells us that setting something to 100% would make it take up the entire viewport... that's not the case. What happens is it ends up taking up 100% of the body tag's height, which by default takes up 100% of the html tag's height.

The html tag doesn't take up 100% of the user's viewport by default - it just becomes however tall it needs to be to hold the website's content. You would have to manually set it's height to 100% to get it to take the entire viewport, but then there's another issue - what if you need more than 100% of the viewport (that's when you usually get a scrollbar)?
 
Last edited:

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
I had a similar problem with this, that my bg image won't fit the the bottom right corner, I have found a fix; just like what Hazirak said,
it can be simply done in CSS, by:

html {height: 100%;}
 
Top