摘要:[FireFox/IE] iFrame中Height tag 設定為100%無效?
問題:
Chrome 中沒問題,但在Firefox / IE就會出現。
HTML Code結構是如此:
<div style="height:373px;">
<table width="100%" height="100%">
<tr>
<td>
<iframe id="iframe1" ... width="100%" height="100%"></iframe>
</td>
</tr>
</table>
</div>
不管怎麼調整 iframe 中的 Height 都無法將iframe整個擴展起來。
解決方法:
本來是有想用jQuery來解決,但總覺得繞一大圈設定實在很麻煩;
最後發現是 <td> 也要設定 Height tag。
<div style="height:373px;">
<table width="100%" height="100%">
<tr>
<td width="100%" height="100%">
<iframe id="iframe1" ... width="100%" height="100%"></iframe>
</td>
</tr>
</table>
</div>
果然惡魔總是藏在小細節裡呀