【问题标题】:Changing Container Height更改容器高度
【发布时间】:2011-02-17 21:50:05
【问题描述】:

我在这里遇到了一些小问题。我为所有页面使用标准容器高度和 css 代码。对于大多数页面,有足够的内容来填充它,而对于某些页面,内容可能只占页面的 10-20%。那么这些页面使用不同的最小高度是个好主意吗?下面是代码:

#wrapper {
   background-color: #999999;
   margin:0 auto; 
   min-height: 600px;
   width:770px;
   font-family: "Lucida Grande", Verdana, "Lucida Sans Unicode", Arial, Helvetica, 
   sans-serif;
   font-size:15px;
   color: #222222;
   margin-left:60px;
   margin-bottom:60px;
}

【问题讨论】:

    标签: height containers wrapper css


    【解决方案1】:

    在单独的类中声明较小的min-height 可能会更好。

    那么,你可以<div id="wrapper" class="smallerContent">

    #wrapper.smallerContent {
        min-height: 300px
    }
    

    【讨论】:

      猜你喜欢
      • 2020-08-02
      • 2015-01-05
      • 1970-01-01
      • 2022-01-03
      • 1970-01-01
      • 1970-01-01
      • 2021-03-31
      • 2022-06-23
      • 1970-01-01
      相关资源
      最近更新 更多