1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

关于自适应高度

本帖由 lane2006-06-20 发布。版面名称:前端开发

  1. lane

    lane New Member

    注册:
    2005-09-05
    帖子:
    6,548
    赞:
    29
    我怎么总搞不好呢?

    footer总是会紧贴header出现在中间部分后面,而不是下面。

    clear:both;
    也用了,仍然不好。

    除非指定中间部分的高度。
     
  2. shangjay

    shangjay New Member

    注册:
    2006-01-13
    帖子:
    3,530
    赞:
    15
    clear:both;没放对地方
     
  3. lane

    lane New Member

    注册:
    2005-09-05
    帖子:
    6,548
    赞:
    29
    我放在了footer里,不对么?
     
  4. lane

    lane New Member

    注册:
    2005-09-05
    帖子:
    6,548
    赞:
    29
    HTML:
    #header{
    width:100%;
    height:68px;
    background:url("headerlogobg.jpg");
    }
    
    #daohang{
    background:#595955;
    font-size: 14px; 
    color: #ffffff;
    height:35px;
    line-height:35px;
    }
    
    #soft_mainbox{
    margin:3px 0px 5px 0px;
    padding:0px 0px 3px 0px;
    background:url("mainbg2.gif") repeat-y 650px;
    }
    
    #footer1{
    background:#595955;
    height:35px;
    width:100%;
    font-size:12px;
    line-height:35px;
    clear:both;
    }
     
  5. lane

    lane New Member

    注册:
    2005-09-05
    帖子:
    6,548
    赞:
    29
    解决了,原来我soft_mainbox里面的左右用的是绝对定位,我换成float就解决了。
    不知道是什么原因。