2010-03-03 63 views
1

我有一個html頁面,我想要在頁面底部對齊一個iframe,以便iframe佔據所有寬度,我無法對齊底部的iframe。請在iframe中查找iframe標記頁面的底部。對齊一個iframe

<html> 
<body> 

<p>The rest of the code has not been mentioned to reduce code overflow.</p> 
<p>I want to align the iframe after a long page having no. of jquery , images etc.</p> 

<iframe src ="bottom.html" width="100%" height="200" style="float:bottom" scrolling="no" frameborder="0"> 
<p>Your browser does not support iframes.</p> 
</iframe> 
</body> 
</html> 

回答

1
<iframe src="bottom.html" style="position:absolute; bottom:0px; height:200px; width:100%;" scrolling="no" frameborder="0"> 

對不起。改爲嘗試。

+0

對不起,即使這不起作用。 – Gaurav 2010-03-03 21:04:38

+0

你使用什麼瀏覽器?當你說它不起作用時,究竟發生了什麼?它是否移動了iframe? – 2010-03-03 21:34:12

+0

我使用的是Firefox以及Internet Explorer 8,但框架出現在兩個瀏覽器中的頁面中間附近,而不是在底部。 因此,我使用多個
標記將它移動到底部,這是一個不好的做法,但是它提供了所需的輸出。所以想得到一些幫助,找到替代
標籤。 – Gaurav 2010-03-03 21:42:45

0

使用頂部標籤而不是底部標籤。

<iframe src="bottom.html" style="position:absolute; top:450px; height:200px; width:100%;" scrolling="no" frameborder="0">