2016-11-07 87 views
0

this page,以在Chrome 480像素視口,我想設置:.container高度自動不適應內容

#header.boxed .container { 
    height: auto; 
} 

代替:

#header.boxed .container { 
    height: 186px; 
} 

當我做這個,#header.boxed .container比我需要的不高。

如何確保#header.boxed .container足夠高以顯示其內容?

謝謝。

回答

0

要做到這一點,你需要在480像素視口CSS

#top .logo { 
    /*background-image: url("//test.doig.com.au/magnifique/wp-content/uploads/sites/8/2016/10/bg-header.jpg"); 
    background-repeat: no-repeat;*/ 
    clear: both; 
    padding: 10px 0; 
    top: 0; 
} 


#header #searchform { 
    float: right; 
    /*position: absolute; 
    right: 0; 
    top: 63px;*/ 
    width: 220px; 
} 

.social_bookmarks { 
    border: medium none; 
    display: block; 
    float: left; 
    height: 24px; 
    list-style-position: outside; 
    list-style-type: none; 
    /*position: absolute; 
    right: 231px;*/ 
    top: auto; 
} 

一些變化希望它會爲你工作:)

+0

非常感謝馬迪。我只需要'#header.boxed .container {height:auto; }'或'#header.boxed {height:auto; }'總體來說,'#header.boxed'的行爲適應混合的視圖端口寬度,並且不會讓導航在其頂部蔓延,並且'{#top .logo img {width:100 %!重要; height:auto!important;}'控制'#header.boxed'的高度。 – Steve