Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

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))

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report