2014-04-18 21 views
0

我得到了一個網站並排divs,其中之一是絕對定位。絕對定位div是導航區域,因此設置爲保持靜態滾動(您可以在這裏看到:evanbeltran.com)。圖像不調整在瀏覽器窗口調整大小 - 由絕對位置造成的?

但是,當您點擊圖像頁面時,如果瀏覽器窗口太小,圖像將在導航div下方結束。我試過最大寬度和高度的CSS,但他們不做任何事,無論我把它們放在哪裏。 id是什麼樣的是要弄清楚如何讓非絕對定位的div中的圖像調整大小。你可以看看我的意思是:http://evanbeltran.com/portsites/vansspace.html

謝謝你的幫助。

回答

0

試試這個:

// Remove the width and margin-right from #content2 then add: 

#content2 { 
    padding-left: 250px; 
} 

// Remove the margin-left from .image so it looks like this: 
.image { 
    width: 100%; 
    list-style: none; 
    margin: 0 auto; 
    margin-top: -130px; 
    padding: 10px; 
} 

// set a max width on your image 
.padder { 
    padding-bottom: 25px; 
    max-width: 100%; 
} 

enter image description here

相關問題