2011-09-23 94 views
0

你們能否幫助我解決這個問題?我要實現以下佈局:如何通過縮放級別/屏幕分辨率來增加div的高度?

 
Root div 

    -Header 
    -Content 

Footer div 

有不應該是Root Div和頁腳之間的任何間隙。頁腳應始終粘貼在網頁的底部。所以基本上,如果我縮小或增加分辨率,Content Div應該增加高度。

可以任何人請告訴我如何實現這一目標嗎?


div來看是這樣的:

<header> 
    <container> 
     <content> ---> Has a gradient background 
      <text> 
      <image> ---> The bottom end of this image should be behind the footer, and when the screen resolution changes, the complete image should display with the Gradient background extended until the footer. 
<footer> 

回答

2

它幾乎總是一種幻覺 - 是,當你擴大你的網頁你沒有得到更多的內容。 http://www.cssstickyfooter.com/把你的包裝div上的背景圖像/顏色會給你你正在尋找的可能的結果。

+0

感謝您TEH提示。其實我可以將頁腳粘貼到底部,但是當窗口縮小或分辨率增加時,我無法找到擴展內容DIV的方法。你能給我一個小費嗎? – user935524

1

像這樣?:

<div id="root" style="height:100%;"> 
    Le root 
</div> 
<div id="footer" style="position:absolute;bottom:0px;">Le Footer</div> 
相關問題