2010-03-03 62 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">