试试这个小提琴 -
http://jsfiddle.net/hKyzT/
HTML
<div id="left_column">
/* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated */
</div>
<div id="right_column">
/* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated *//* A bunch of 100px width photos that are being floated */
</div>
CSS
html, body, #wrapper, #left_column, #right_column { height: 100%; min-height: 100%; }
#left_column {
width: 200px;
float: left;
border:1px solid green;
height: 100%;
min-height: 100%;
}
#right_column {
margin-left: 200px; border:1px solid red;
}
我只想补充一点,这个解决方案为我多固定列和可变右列:漂浮的所有列*除最右边的列以外,然后将最右边的列的margin-left **属性设置为其他列宽度的总和(加上边距)。 –