当我点击刷新它变得一半可见

时间:2011-04-08 09:12:54

标签: html css dojo

我的页面上有一个网格,我在其中显示日志历史记录和刷新按钮(onclick我用新数据刷新网格)。

<div dojoType="dijit.layout.ContentPane" title="Log history">
    <button dojoType="dijit.form.Button" id="btn_refresh" onclick="load_logs" style="float:right; border:1px solid black;">Refresh</button>
    <div dojoType="dojo.data.ItemFileReadStore" jsId="log" data="window.store_data_log"> </div>
    <div id="grid_log" dojoType="dojox.grid.DataGrid" store="log" structure="window.layout_log" queryOptions="{deep:true}" query="{}" clientSort="true" rowsPerPage="5"> </div>
</div>

enter image description here之前 在enter image description here

之后

问题是,当我点击Chrome时,我的刷新按钮会向上移动并变为半可见。我试图将<BR/>放在按钮之后,然后根本看不到网格。我试图把按钮放在一个新的但是然后网格根本看不到。怎么办?

1 个答案:

答案 0 :(得分:1)

我有一个类似的问题,并决定使用dijit.layout.LayoutContainer和dijit.layout.ContentPane,它运作良好。在主内容窗格中,只需设置layoutAlign =“client”,它将占用剩余的布局空间。

<div dojoType="dijit.layout.ContentPane" 
     title="Log history">

     <div dojoType="dijit.layout.LayoutContainer" 
          style="width: 100%; height: 100%;">

        <div dojoType="dijit.layout.ContentPane" 
             layoutAlign="top" 
             style="height:28px;padding:2px;">

             <button dojoType="dijit.form.Button" 
                    id="btn_refresh" 
                    onclick="load_logs"
                    style="float:right; border:1px solid black;">
             Refresh</button>

        </div>

        <div dojoType="dijit.layout.ContentPane" 
             layoutAlign="client" 
             style="padding:0px 2px;">

             <div dojoType="dojo.data.ItemFileReadStore" 
                  jsId="log"    
                  data="window.store_data_log"> </div>

             <div id="grid_log" 
                  dojoType="dojox.grid.DataGrid" 
                  store="log"   
                  structure="window.layout_log" 
                  queryOptions="{deep:true}" 
                  query="{}" 
                  clientSort="true" 
                  rowsPerPage="5"> </div>

       </div>
   </div>
</div>
相关问题