2016-11-07 91 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