2013-04-03 38 views
0

帮助!??我正在创建一个网站,出于某种原因,容纳所有内容的主要div在内容进入内容时似乎不会自动展开。div不会随其中的内容扩展..?

代码如下。

THANKYOU!

HTML:

<!-- Content --> 
<div class="content-wrapper clearfix"> 
    <div id="content"> 
    {% if template == 'list-collections' %} 
    {% include 'collection-listing' %} 
    {% else %} 
    {{ content_for_layout }} 
    {% endif %} 

    {% unless template contains "customer" or template contains "cart" %} 
    {% include 'col-widgets' %} 
    {% endunless %} 
    </div> 
</div> 
</div><!-- /.content --> 

CSS:

.wrapper{ 
    width: 810px; 
    margin: 0 auto; 
    padding: 0 20px; 
    text-align: left; 
    min-height:100%; 
    } 
.ie6 .wrapper{ height: 100%; } 

     #content { 
     height:200px; 
     width: 810px; 
     background-color:#fff; 
     position: absolute; 
     } 

#col-main{ 
    -moz-box-sizing: border-box; 
    margin-top:0px; 
    line-height: 2; 
    margin: 5px; 
    padding: 30px; 
    background-color: #FFFFFF; 
    float: center; 
    position: relative; z-index: 1; 
    height: 200px; 
    background-color: #FFFFFF; 
    border: 1px solid #D5DCE1; 
    } 

回答

0

添加height:auto;#col-main应该修复它。

+0

THANKYOU !!任何想法为什么下面还有一个巨大的黄色空间? (最后一个问题我保证!) – user1833002

+0

尝试'height:auto;'在'#content'下面。这可能会解决它。 –

+0

已经尝试过...... grr – user1833002