当 Treeview 控件展开时,页脚固定在页面底部

Footer to stick to bottom of the page when Treeview control expands


大家好! 我无法让页脚停留在页面底部。我有 treeview 控件,当展开时与页脚重叠。请帮助使页脚保持在页面底部。

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   
    <style type="text/css">
        html{
             height: 100%;
            box-sizing: border-box;
        }
            *,
            *:before,
            *:after {
              box-sizing: inherit;
            }

        body {
          position: relative;
          margin: 0;
          padding-bottom: 6rem;
          min-height: 100%;

        }

          
       
       #container {
        margin-bottom: 50px;
        min-height:100%;
        position:relative;
        text-align: left;
        font-size: medium;
       font-family:Verdana;
        
        }

       /*#main{
           overflow:auto;
           padding-bottom:50px;
           /*height:2000px;
           text-align: left;
        font-size: medium;
       font-family:Verdana;
       }*/

        
         #Footer{
             
            position:absolute;
            /*z-index: 10;
             width:100%;*/
             /*margin:auto;*/
             bottom:0;
             height:50px;
             font-family:Verdana;
             font-size:70%;
            color:black;
            /*margin-top:-50px;*/
             clear: both;


            
        }
    </style>
</head>
<body>

   
    <form id="form1" runat="server">
 
       
        <div id="container">

           <%--<div id="main">--%>
                 <asp:TreeView runat="server" ID="TrVwEmpHier" BackColor="White" ForeColor="Black" ExpandDepth="1" Height="169px" Width="119px" NodeIndent="50">
                            <HoverNodeStyle />


                            <LeafNodeStyle Font-Bold="False" Font-Italic="True" NodeSpacing="2px" VerticalPadding="2px" />
                            <NodeStyle Font-Bold="True" NodeSpacing="2px" VerticalPadding="2px" />
                            <ParentNodeStyle Font-Names="Verdana" Font-Size="Larger" NodeSpacing="2px" VerticalPadding="2px" />


                            <RootNodeStyle Font-Italic="True" Font-Names="Verdana" Font-Size="XX-Large" NodeSpacing="2px" VerticalPadding="2px" />


                        </asp:TreeView>
                    

            <%--</div>--%>
                       


        </div>
        <div id="Footer">
            
       <%=@DateTime.Now.Year%> 
        </div>
      
    </form>

           
    
</body>
     
</html>

请帮忙!大家好! 我无法让页脚停留在页面底部。我有 treeview 控件,当展开时与页脚重叠。请帮助使页脚保持在页面底部。

如果您对我从哪里得到答案感到好奇,请按照此 link.Amazing 解释进行操作。

只需添加 display: flex;在页脚样式中,我能够使页脚贴在屏幕底部。