2

我发现了几个有类似问题的帖子,但没有好的答案。我在一个 div 中有两个 div 有 display: table-row 属性。我的右侧 div 需要固定为:200px,左侧必须占用剩余空间。

CSS: 

.dhPictureDiv{
float:left;
height:100%;
background-color:red;}

.dhInfoWrapper{
width:200px;
float:right;
background-color:yellow;
border: 0px solid red;}

.dhDivRow {
display: table-row;}

HTML:

<div class="dhDivRow><div class ="dhPictureDiv></div><div class ="dhInfoWrapper></div></div>
4

1 回答 1

4

这已经被掩盖了,但是你去:

http://jsfiddle.net/wu7TR/

我真的建议简化你的班级系统

.dhPictureDiv{
    background-color:red;
    height: 100px;
    display: table-cell;
    width: 100%;
}

.dhInfoWrapper{
    background-color:yellow;
    height: 100px;
    display: table-cell;
    min-width: 200px;
}

.dhDivRow {
    display: table;
}​
于 2012-12-06T13:30:49.603 回答