我知道還有很多類似的問題,但沒有一個幫助我解決這個問題。我有非常簡單的設置:自動拉伸表格單元div css
<div class="wrapper">
<div class="dontBreakmyLine">
Some generated text
</div>
<div class="iCanUseWhatIsLeft">
Another generated text
</div>
</div>
和CSS至今:
.wrapper {
width: 100%;
display: table;
}
.dontBreakmyLine {
display: table-cell;
}
.iCanUseWhatIsLeft {
display: table-cell;
}
現在我需要伸展第一個div內容,並讓另一個人拿剩餘空間。我知道在第一個div中生成文本的最大寬度將是300px,但最大寬度不會在這裏工作,因爲我願意。有什麼建議嗎?
將第一個浮動到左邊......? – CBroe
借調。這不是什麼表格。 –