我的div中有一个外部jsp页面(菜单)和一个DOJO表。当我尝试在div上应用
overflow:auto;时,我看到了两个滚动条。一个用于表,另一个用于菜单。如何使单个滚动条的菜单和表格滚动?
<div id="table">
<jsp:include page="searchgroup.jsp"></jsp:include>
<div id="grid1" jsid="grid1" dojoType="dojox.grid.EnhancedGrid" query="{ name: '*' }"
data-dojo-props="plugins:{ pagination:{pageSizes: ['10', '25', '50', '100'],
description: true, sizeSwitch: true, pageStepper: true, gotoButton: true, position: 'bottom', maxPageStep: 7}}, rowsPerPage:10">
</div>
</div>
这是我的CSS
#grid1{
height: 85%;
width: 104%;
overflow-x:auto;
}
#table{
height:90%;
width:104%;
overflow-x:auto;
}
<script>
dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.grid.enhanced.plugins.Pagination");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dojox.grid.enhanced.plugins.Filter");
dojo.require("dojox.data.QueryReadStore");
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
var gridLayout = [
{
name : "S. No.",
classes : "title",
width : "70%",
get : siFormatter,
filterable : false
}, {
name : "Site Id",
classes : "title",
field : "siteId",
width : "70%"
}, {
name : "IP/Phone No.",
classes : "title",
field : "devType",
width : "120%"
}, {
name : 'Site Name',
classes : "title",
field : "name",
fields : [ 'company', 'name' ],
formatter : formatLink,
width : "110%"
}
</script>
答案 0 :(得分:0)
因为您在其中都应用了overflow: auto
你应该在其中一个上使用它而不是两个