我想讓一個div浮動到一個固定的大小,剩下的空間需要留下。 我曾經做過這樣的流動方式:浮動右鍵問題
HTML:
<div class="container">
<div id="rightCntr">
</div>
<div id="leftCntr">
</div>
</div>
CSS:
#leftCntr {
float: none; /* not needed, just for clarification */
background: #e8f6fe;
/* the next props are meant to keep this block independent from the other floated one */
width: auto;
overflow: hidden;
}
#rightCntr { float: right; width: 213px;}
這在Firefox和Chrome的工作很好,但在IE8它去都錯了。 Example
你知道如何左邊的容器需要(像素),還是可變的? –
試着在'float:rignt'之後清除:兩個'。 – Vucko
你可以分享你的'
'部分,文檔模式是'IE5 quirks' –