【问题标题】:div moves incorrectly on browser resizediv 在浏览器调整大小时移动不正确
【发布时间】:2011-10-20 18:48:24
【问题描述】:

我正在尝试为我的网站设置购物车,但在调整浏览器大小时,我缺乏正确使用 css 格式化三列的知识。

css 最初有以下内容:

.threeFrames .leftStyle {float: left; position: relative; width: 20%;}
.threeFrames .centerStyle   {float: left; position: relative; max-width: 60%;}
.threeFrames .rightStyle    {float: left; position: relative; width: 20%;}

但这并没有达到我想要的效果。我想将两端的列设置为固定的width 240px,但是,当我这样做时,当浏览器调整大小时,它会将右侧列撞到其他列下方,而我只想缩小中间列。

【问题讨论】:

  • 边距/填充? + 至于我 .rightStyle 应该是 float:right & .centerStyle 没有浮动.....
  • 你应该在询问之前search

标签: css html resize


【解决方案1】:

如果您创建.rightStyle {float:right;} 并且根本不设置中间列的样式,它会在可能的情况下自动环绕。

【讨论】:

    猜你喜欢
    • 2014-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-08
    • 1970-01-01
    • 2018-01-12
    相关资源
    最近更新 更多