有个框架页面,我想在这里面浮动一个DIV,要求漂浮在这个框架上面
<frameset onload="initialize();timer();" id="950set" frameborder="0" border="framespacing=" frameSpacing="0">
<frame src="blank.htm" scrolling="no">
</frameset><div id ="d1"></div>请问我应该怎么写,
不是框架页面,我倒是会写,能有效果

解决方案 »

  1.   

    现在的需求....我也等着看DIV怎么脱离本身的框架
      

  2.   

    <div id ="d1" style="position:absolute; border:1px solid black;  float:left; margin-left:2px; margin-top:2px; width: 200px; height:50px; top: 19px; left: 38px;"> </div> 
      

  3.   

    var div = top.document.createElement('div');
    div.style.position='absolute';
    ......
    top.document.body.appendChild(div);
      

  4.   

    position:absolute;  设置成绝对定位就行了撒!那你想放到哪就放到哪 啊!
      

  5.   

    单纯的 position:absolute; 是不行的。
    因为它是要覆盖在另外的一个框架上。
      

  6.   

    框架页是不支持浮动div层的,我原先在后台框架上也用了一个浮动层,但失效了,后来看到一种解决方法,
    就是新建一个html页,登陆成功后就进入到这个里面index.html。这个html只链接到框架页,等于是转了个弯index.html:<html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title></title>
        <style type="text/css">
          html,body { margin:0;padding:0; height:100%;}   
        </style>
    </head>
    <body>
     <iframe  src="index.aspx" style="width:100%; height:100%; border:0" scrolling="no"></iframe>
    </body>
    </html>
    index.aspx:<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title> 
    </head>
        <frameset border="0" framespacing="0" rows="85,*" frameborder="NO" cols="*">
        <frame name="topFrame" src="top.aspx" noResize scrolling="no"/>
        <frameset border=0 frameSpacing="0" rows=* frameBorder="no" cols=210,*>
            <frame name="left" src="m_left.aspx" noResize/>
            <frame name="main" scrolling="auto" runat="server" id="mainFrame"  src="right.aspx"/>
        </frameset>
        </frameset>
    </html>
      

  7.   

    非常感谢gdjlc,这方法的确可行
    唉,
    为什么我自已一开始没有想到这种办法呢?
    反思中!
      

  8.   

    我想请教一个问题啊,我现在要做一个遮罩层,遮盖整个框架页面,遮罩层是在left页面里面新建的,那我该如何配置我的css 啊
      

  9.   

    框架页是不支持浮动div层的,我原先在后台框架上也用了一个浮动层,但失效了,后来看到一种解决方法, 
    就是新建一个html页,登陆成功后就进入到这个里面index.html。这个html只链接到框架页,等于是转了个弯 index.html: HTML code
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title></title>
    <style type="text/css">
    html,body { margin:0;padding:0; height:100%;} 
    </style》
    这个html只链接到框架页 是不是在里面嵌套一个 iframe啊  连接??
      

  10.   

    牛啊,内嵌后确实可以在页面做一些处理了,thanks