2013-04-03 49 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