How to ensure the footer stays at the bottom of the page even when the Treeview control expands


Greetings Everyone! I'm facing an issue with keeping the footer pinned at the bottom of the page. The treeview control I'm using overlaps the footer when expanded. Can anyone assist in ensuring the footer remains at the bottom of the page?

<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">
            
       <%<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b760b0f2a3f2e1f22262e6505243c65122e2a39">[email protected]</a>%> 
        </div>
      
    </form>

           
    
</body>
     
</html>

Assistance Needed! Greetings Everyone! I'm encountering difficulty in fixing the footer's position at the bottom of the page. Upon expanding the treeview control, it obscures the footer display. Kindly provide support to ensure the footer stays at the bottom of the page.

Answer №1

For those wondering about the source of my answer, you can check it out here. It's an amazing explanation. Responsive footer displayed over parts of content when shrinking browser

Simply by including display: flex; in the footer style, I was able to ensure that the footer stayed at the bottom of the screen.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the method for adjusting the position of materialize CSS select options?

https://i.stack.imgur.com/b9p9T.png One issue arises when I open the Materialize CSS select, as the options end up covering the input. Ideally, I prefer the options to appear underneath the input. <div class="input-field "> ...

When scrolling the page, the Circle Mouse Follow feature will dynamically move with your cursor

Hey everyone! I'm currently working on implementing a mouse follow effect, but I'm facing an issue where the circle I've created moves along with the page when scrolling, instead of staying fixed to the mouse. Any suggestions or tips would b ...

How can I enable two-finger scrolling on mobile web browsers?

I am currently tackling a project that involves dragging operations on a canvas, making scrolling with a single finger impractical. My goal is to enable scrolling using two fingers instead. After testing different touch-action values, I discovered that pi ...

How to retain existing data in a SQLite database when implementing code-first onModelChange

As a newcomer to Sqlite and EF, I have created a DbContext with model classes that generate a local database when the application starts. The database is meant to be updated while the application is running. However, whenever I make changes to the model ( ...

Struggling to align the login button accurately within the navbar

For proper alignment, the "Login" button needs to be pushed to the right of the navbar alongside other buttons. To see the issue and the code, check out this JSFiddle example: https://jsfiddle.net/sterlingmd17/tk17zjfq/1/ <nav class="navbar navbar ...

What could be the reason for my onChange event not functioning properly?

The issue I'm experiencing involves my onchange event not properly copying the text from the current span to the hidden field. Any ideas on why this might be happening? Check out my code at this link. ...

Utilize jQuery to extract the content, rearrange the content, and then encapsulate it within fresh

I attempted all day to rearrange this menu the way I want, but since I am new to jQuery, I'm facing some challenges. Here is what I am currently trying to achieve: Inside the last td.top of this menu, there are 3 ul.sub li items. I aim to extract ...

Steps to activate highlighting for the initial value in a quarterly datepicker

Concerning the quarterPicker feature in the Bootstrap datePicker (SO: how-to-change-bootstrap-datepicker-month-view-to-display-quarters, jsfiddle: jsFiddle): Is there a way to highlight an initial value upon startup? I have tried setting a value in win ...

Creating a stylish CSS shadow effect for a collection of elements

In my Ionic2 project, I have an <ion-list> consisting of various items. Currently, these items are plain, but I desire to add some styling such that each item in the list displays a subtle shadow effect, similar to the one shown in the first image of ...

Exploring Django's view field for efficient data rendering

Is it possible to display multiple views for a single page/template? For instance, imagine a website where users can submit movie reviews and read others' reviews as well. Now, I need to add an edit button to the review pages but only want the button ...

What is the process for setting up a redirect to the login page in ASP.NET?

When using ASP.NET, what is the most effective method for redirecting a user to the login page if they try to access a page intended for registered users? Please note that although I am utilizing ASP.NET WebForms, there are no actual WebForms involved. Th ...

Tips for arranging cards in columns without causing vertical scrolling to be triggered

I am working with Bootstrap 5 and have created a column with multiple cards: https://jsfiddle.net/fzxc1v69/ Currently, all the cards are displayed one below the other, but I want them to be lined up horizontally instead. In my code, the .section class i ...

Persistent change issue with JQuery CSS function

Looking for some help with a button-bar div that I want to display only after the user clicks on a "settings" button. Currently, I have set the button-bar div to have a display:none property in my css file. However, when the settings button is clicked, t ...

Steps to animate a div expanding to fit its content dimensions

I'm looking for a way to animate the opening of a div so that it adjusts to the size of its content. The content is fetched from a separate search using .load, which means it could be just a single line (no result) or multiple results that vary in hei ...

Safari browser not supporting CSS @property --rotate functionality

This card's animation is functioning well in Chrome, but it is not compatible with Safari and Mozilla Firefox. I suspect the issue lies with the @property --rotate, as it is no longer supported by Safari. Therefore, I am searching for an alternative ...

Obtaining data from a website with Java: A step-by-step guide

I am trying to retrieve the SIC Code from the following URL: . However, when I run my code, I encounter the following error: public static void main(String[] args) { try { Document doc = Jsoup.connect("http://www.manta.com/c/mx4s4sw/bowflex-ac ...

The margin of the parent container is influencing the margin of the child element

Purple Working on displaying a rectangle shape in a browser using divs in my React project. Everything works fine, but when I add margin to the parent base and then draw the boxes, there's some space between the mouse cursor and the actual box. The ...

Apply a unique CSS class to the first two elements, then skip the following two elements, and continue this pattern using ngFor in Angular and flex styling

Here is a code snippet that displays a list of products using *ngFor in Angular: <div class="container-products"> <div class="item-product" *ngFor="let product of ['product A', 'product B', 'prod ...

Pictures failing to appear in css/jquery slider

I have a total of 12 divs that are configured to display a thumbnail along with some text dynamically retrieved from a database query. When displayed individually, they appear fine in a column format with a border around them showcasing the thumbnail and t ...

Improving Material UI Responsiveness: A Comprehensive Guide

Could someone please help me resolve the overflow issue in my UI? You can view the overflow here. The second image explains the reason behind it, which you can see here. I am currently working on fixing my UI using React and Material UI. When checking the ...