2013-07-12 39 views
0

我正在嘗試在我的網站的左下角浮動一些iframe的天氣信息。我有大小和一切設置在一起,但我不知道我在做什麼,當涉及到從一個div內正確地浮動它。我似乎無法讓div和iframe漂浮在網站的左下角。使用iframe浮動div

在這裏的許多谷歌的搜索和搜索以及之後,我已經有點粘下面一起來:

<div style="position: absolute; bottom:3px; overflow: hidden; left: 0px; border: 0px none; width:270px; height:370px;"> 
<div style="overflow: hidden;"> 
</div> 
<iframe src="http://weather.gc.ca/wxlink/wxlink.html?cityCode=on-162&amp;lang=e" scrolling="no" style="height: 300px; border: 0px none; width: 165px; margin-bottom: 0px; margin-left: 24px;"> 
</iframe> 
</div> 
</div> 

您可以查看它是什麼,我試圖完成這裏:http://www.soozoo.ca

回答

2

試試這個

http://jsfiddle.net/MqEhF/

HTML

<div style="left: 0px; border: 0px none; height: 370px; position: fixed; width: 270px; overflow: hidden; bottom: -67px;"> 
    <div style="overflow: hidden;"> 
    </div> 
    <iframe src="http://weather.gc.ca/wxlink/wxlink.html?cityCode=on-162&amp;lang=e" scrolling="no" style="height: 300px; border: 0px none; width: 165px; margin-bottom: 0px; margin-left: 24px;"> 
    </iframe> 
    </div> 
    </div> 
+0

這很好。我明白你是如何通過固定位置來糾正它的。獲得的教訓,再次感謝。 – Antec

0

使div的位置「固定」。

希望工程!