获得两个垂直滚动条和水平滚动条不显示

时间:2016-09-21 15:13:59

标签: html css ag-grid

我已经在线阅读了很多关于这个问题的答案,尝试了从overflow-y:hiddenoverflow-x:scroll;white-space:nowrap的所有内容,但没有任何作用:

<html style="height: 100%;">

    <head lang="en">
     <meta charset="UTF-8">
        <title>Titler </title>
        <script src="../dist/ag-grid-enterprise.js?ignore=notused30"></script>
        <script src="sorting.js"></script>

    </head>
<body style="height: 100%; margin: 0px;">

   <center>

           <div style="font-style:bold;font-size:30;color:black;"> DM </div>
<BR>
   <font size="2" color="red"> <a href="ag-grid_selector.jsp">  UPDATE  </a>        </font  >
   </center>


<BR></center></br>
<div>
        <center><span style="padding-bottom: 4px; display: inline-block;">
            <button onclick="buyside()">Buy</button>
            <button onclick="sellside()">Sell</button>
            <button onclick="clearFilters()">Clear Filters</button>

        </span><center>


        </div>

        <div id="myGrid" style="width: 100%; height: 100%; margin:0px" class="ag-fresh"></div>       

  </body>

</html>

但是我在图像中显示了双垂直滚动条,并且只有在向下滚动外部垂直滚动条之后才出现水平滚动条,这是一种不便。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

第10行的变化:

<body style="height: 100%; margin: 0px; overflow: hidden;">

   <html style="height: 100%;">

       <head lang="en">
        <meta charset="UTF-8">
           <title>Titler </title>
           <script src="../dist/ag-grid-enterprise.js?ignore=notused30"></script>
           <script src="sorting.js"></script>

       </head>
   <body style="height: 100%; margin: 0px; overflow: hidden;">

      <center>

              <div style="font-style:bold;font-size:30;color:black;"> DM </div>
   <BR>
      <font size="2" color="red"> <a href="ag-grid_selector.jsp">  UPDATE  </a>        </font  >
      </center>


   <BR></center></br>
   <div>
           <center><span style="padding-bottom: 4px; display: inline-block;">
               <button onclick="buyside()">Buy</button>
               <button onclick="sellside()">Sell</button>
               <button onclick="clearFilters()">Clear Filters</button>

           </span><center>


           </div>

           <div id="myGrid" style="width: 100%; height: 100%; margin:0px" class="ag-fresh"></div>       

     </body>

   </html>