0
正如我試圖爲我的遊戲網站之一開發模板。在這裏我得到height="auto"
財產的問題。事情是我使用容器分區寬度作爲固定值和容器高度作爲自動值。手段實際上我的主頁高度大約在500px
,但我的播放頁面高度需要按照要求。當我在遊戲玩法下添加一個div時,我無法看到容器。請看這個細節。 http://www.toon10.com/play/Mario_Vs_Bowsercss div高度屬性問題
其實我所做的是總包裝我保持高度爲450px
和在播放頁面我保持高度爲自動。任何人都可以檢查這個,讓我知道我犯了什麼錯誤。
見我的代碼:
#wrapper{
margin: 0 auto;
width: 1230px;
height: 450px;
background: #fff;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
overflow: hidden
}
播放頁:
<div style="width:900px;">
<div><?php echo strtoupper($gameInfoRow['name']);?></div>
<div class="boxContent" style="height:100%; padding:5px">
<div align='center'>
/// game here
</div>
</div>
<div style="clear:both"></div>
</div>
<div style='height:5px'></div>
<div style="width:900px; background:#CC0000; height:500px">
//the below game box red strip
</div>
感謝Alaa Badran,它現在有效。感謝您的支持.. – phphunger 2012-08-06 11:29:22