流体布局 – 3列布局,左右列固定.右列在较小的屏幕上流入中间列

HTML设置

CSS:

#fixed-wrapper{
    min-width: 1264px;
}
#header{
    width: 100%;
    height: 75px;   
    text-align: center;
}
#header h1 
{
    line-height: 75px;   
}
 #centerCol {
    margin-left: 310px;
    margin-right: 360px;
    height: 100%;
    min-width: 604px;
}
#rightCol {
    width: 285px;
    height: auto;
    position: absolute;
    top: 75px;
    right: 0;
    margin-right: 75px;
}
#leftCol {
    width: 235px;
    height: auto;
    position: absolute;
    top: 75px;
    left: 0;
    margin-left: 75px; 
}

问题是中心列需要具有最小宽度,但右列不应移动到中心列.

最佳答案
尝试将中心列的宽度设置为auto而不是定义其最小宽度,

 #centerCol {
    margin-left: 310px;
    margin-right: 360px;
    height: 100%;
    width: auto;
}

相关文章

css的bordercolor属性怎么使用
CSS中contain属性的作用和语法
深入学习响应式布局框架:适合初学者到专家的详尽指南
CSS3选择器优先级规则
margin-top用法
选择最适合您的响应式布局框架:综合评估不同工具