【问题标题】:4 Column Position absolute layout4 Column Position 绝对布局
【发布时间】:2012-07-03 16:08:45
【问题描述】:

我有一个布局设置,可以在这里查看:http://jsfiddle.net/Pn3ts/

一切正常,但我需要设置整个地段的最大/最小宽度。

所以我假设这样做我会将position: relative; 添加到.row 类中。但是,如果我这样做,每个.col 的背景似乎都会崩溃。 (见这里:http://jsfiddle.net/YDBYK/

我该怎么做?

【问题讨论】:

    标签: html css css-position fluid-layout


    【解决方案1】:

    htmlbody.row 设置为 100% 的高度,它会起作用。

    html, body {
        height: 100%;
    }
    
    .row {
        position: relative; 
        width:100%; 
        height: 100%;
        margin: 0; 
        max-width: 400px; 
        min-width: 300px;
    }
    

    jsFiddle:http://jsfiddle.net/YDBYK/1/

    【讨论】:

      猜你喜欢
      • 2011-09-18
      • 2017-01-03
      • 2011-07-28
      • 2015-03-31
      • 2013-05-11
      • 2018-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多