【问题标题】:how to have fixed height divs using 960.gs?如何使用 960.gs 获得固定高度的 div?
【发布时间】:2009-12-07 00:29:30
【问题描述】:

我正在使用 960.gs 来进行简单页面的布局,但是我很难为我正在使用的 DIV 设置最大高度。考虑以下几点:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
<link rel="stylesheet" type="text/css" media="all" href="reset.css" />
<link rel="stylesheet" type="text/css" media="all" href="text.css" />
<link rel="stylesheet" type="text/css" media="all" href="960.css" />
</head>
<body>
 <div id="topContainer" class="container_12">

  <div style="height:200; overflow:hidden" class="grid_10">

  <!-- lots of text or a large image-->

  </div>

  <div class="grid_2"> <!-- rhs col--> </div>
</div>

如何为这个 div 设置一个特定的高度?我曾尝试在顶级容器上设置“高度”属性,但这也无济于事。

感谢您的帮助!

【问题讨论】:

    标签: css frameworks height 960.gs


    【解决方案1】:

    您忘记了身高参数中的单位:

    <div style="height:200px; overflow:hidden" class="grid_10">
    

    【讨论】:

      【解决方案2】:

      这个问题我也很感兴趣..

      动态布局列必须具有自动最大高度

      如果你能发布一个关于这个问题的方法列表会非常好。

      帕斯卡

      【讨论】:

        猜你喜欢
        • 2023-03-22
        • 2013-02-18
        • 1970-01-01
        • 2010-12-22
        • 2014-11-14
        • 1970-01-01
        • 2022-01-03
        • 2013-10-09
        • 1970-01-01
        相关资源
        最近更新 更多