You have only given the table
those iframes are sitting in height:100%
– but that doesn’t mean the elements inside the table have to take that height as well.
Give the tbody
, tr
and td
elements inside that table the same height as well.
Question
http://onlinehandytools.com/blah.php?board=EDE&level=AL&subject=biology&year=2011
If you click on any of the links labeled QP/MS in Firefox/Opera the iframe won't take up the full height and only takes up about 10% of the height. Not sure why this is happening as it's working perfectly fine in Chrome.
Solution
You have only given the table
those iframes are sitting in height:100%
– but that doesn’t mean the elements inside the table have to take that height as well.
Give the tbody
, tr
and td
elements inside that table the same height as well.
OTHER TIPS
It is probably due to the <doctype>
you used, since iFrame are not supported with XHTML strict Doctype 1.0
In general the use of iFrames is not a good practice, it would be better to use other methods like dhtml and ajax; however there are cases (like your one) when an iFrame is necessary.
So, here there are some solutions:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, which allows the use of iFramesdocument.getElementById('the-iframe-id').style.height = document.getElementById('the-td-id').offsetHeight + 'px';
I hope this may help.