我用的是<div style="position:absolute; left:28%;top:950px; width: 684px;">这样的页面布局,但是数据是动态显示的
所以层的高度就不好固定了,现在问题是页脚footer没办法布局了,不好固定,不固定页脚就显示在页面中间,很棘手,请各位大侠帮帮忙啊,先谢谢了

解决方案 »

  1.   

    页脚一个ID,$("#footer").height("50px");
      

  2.   

    在外面加一层用absolute,里面的全部relative
      

  3.   

    position:absolute;用这个层会跑掉
      

  4.   

    用relative就不好定位了,达不到我要的效果,最外层的我用relative,现在就生最后一个页脚不好定位了
      

  5.   

    footer所在的div和你这个 div属同级,用float:left接上,2个外面再套一个大的div
      

  6.   


    假设浮动DIV的ID为cid
    footer所在DIV的ID为fidfunction _g(id)
    {return document.getElementById(id)}window.onload=function()
    {
    _g("fid").offsetHeight=(parseInt(_g("cid").style.top.replace("px",""))+_g("cid").offsetHeight)+"px";
    }
      

  7.   

    更正一下假设浮动DIV的ID为cid
    footer所在DIV的ID为fidfunction _g(id)
    {return document.getElementById(id)}window.onload=function()
    {
    _g("fid").offsetTop=(parseInt(_g("cid").style.top.replace("px",""))+_g("cid").offsetHeight)+"px";
    }
      

  8.   

    把静态HTML贴出来,你这一部分看不出相互之间的关系
      

  9.   


    静态码是这样的:
    <body style="text-align: center">
    <form id="form1" runat="server">
    <div  id="wh" style=" width:1003px; position:relative;">
        <table border="0" align="center" cellpadding="0" cellspacing="0" style="width: 778px">
            <tr>
                <td style="width: 100px">
                    <uc1:Top ID="Top1" runat="server" />
                </td>
            </tr>
    </table>    <div id="ddd" style="position:absolute; left:22%;top:423px; width: 782px;">
        
        ***************中间动态显示数据显示的***************************
          
         </div> 
     
        
    </div>
        
       
        <div id="bo">
           <uc4:Bottom ID="Bottom1" runat="server" />
       </div>
    </form>
    </body>
      

  10.   

    <div id="ddd" style="position:absolute; left:22%;top:423px; width: 782px;">
        <div id="header" name="header>
        </div>
        <div id="dbody"  name="dbody">
                   ***************中间动态显示数据显示的***************************
        </div>
        <div id="footer" name="footer">
        </div>
    </div> 
    css的内容自己写,框架就这样。
      

  11.   

    不用div,用table,这样可以自动伸缩
      

  12.   

    div也可以自由伸缩
    我一般不会用table的,机理不一样
      

  13.   

    可以把div的滚动条属性设成自动。超高后会自动出现滚动条。而不是加高。