我有一個快速的CSS問題,我希望有人能幫助我!添加更多文本時CSS DIV不擴展
我有一個名爲#ContentPanel的DIV,我希望它能夠擴展,以便它可以滿足需要的更多文本。目前,如果文本長度超過500像素(如CSS中指定的那樣),它會從底部流出並覆蓋下面div中的內容。我如何設置它自動展開並向下推動所有div。
如果任何人有任何想法,請讓我知道
這裏的HTML
<div id="MainContent">
<div id="MainImage"></div>
<div id="ContentPanel">Text content goes here.</div>
</div>
...這是在CSS
#MainContent {
position:relative;
height:500px;
width:800px;
margin:0 auto;
background-color: #000;
}
#MainImage {
position:absolute;
top:0;
left:0;
width:350px;
height:500px;
background-color:#000;
}
#ContentPanel {
position:absolute;
height:500px;
top:0;
left:350px;
width:450px;
background-color:#000;
}
提前感謝!
親切的問候,
Decbrad
對於html/css問題plz發佈他們在doctype.com謝謝! – 2010-04-10 14:37:49