Get the App
SLTechnology News&Howtos  ›  Development  › 

How to parse how to keep the footer at the bottom of a page that is not full in DIV CSS

Shulou Source: shulou.com Published: 2022-06-02 13:41:31 10月02日 Update

In this issue, the editor will bring you about how to analyze the footer at the bottom of the page in DIV CSS. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Here is an example of DIV CSS: how to keep the footer at the bottom of a page that is not full. When the content of the DIV CSS layout is no more than one screen, when the browser window becomes smaller, the line of footer text will float up but remain at the bottom.

DIV CSS instance: keep the footer at the bottom of the page that is not full

In the case of no more than one screen in the DIV CSS layout, when the browser window becomes smaller, the footer text floats up but remains at the bottom.

When the content is one more screen, it is displayed at the bottom of the page, not at the bottom of the window; tested, it is OK, there is no problem in IE6, IE7, FF, etc. There is no problem when the window is reduced! Let's take a look at the DIV CSS example code.

The first is the JS script:

ExampleSourceCode

Functiontest () {varinfoHeight=document.getElementById ("info") .scrollHeight; varbottomHeight=document.getElementById ("bottom") .scrollHeight; varallHeight=document.documentElement.clientHeight; varbottom=document.getElementById ("bottom"); if ((infoHeight+bottomHeight))

Tags: Bottom page content instance code layout situation effect text browser follow process or problem analysis browsing floating running professional small and medium Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL NVidia Redmi Docker