How to eliminate the extra blank space at the bottom of the created web page when browsing

How to eliminate the extra blank space at the bottom of the created web page when browsing

When using Dreamweaver or FrontPage to create HTML web pages, we may encounter this problem: once a good web page in the software is placed in a browser, more or less blank space will inexplicably appear at the bottom of the web page. So how do we eliminate this gap?
At first I thought that I just needed to add a CSS to the web page code to constrain the height of the web page, but it turns out that this doesn't work.

reason:

First of all, we need to know that when using software to write web pages, most of the time they are "stacked" through a graphical interface. When stacking web pages in this way, when creating layers or tables, the height defined by the software for the layers or tables will often exceed the height we want, but this is not visible in the software; however, when we open the web page in a browser, we will find that the blank spaces that do not exist in the software will be displayed in the browser.

The height of a web page cannot be constrained simply by adding an html{height:XX px;} because in a web page, the characteristics of other elements nested inside an element have a higher priority. For example: If you have the following code in the same web page: body{font-size: 10px;} p {font-size: 9px;}, then the font size in the <p> element of the web page should be 9px instead of 10px. Due to the existence of this rule, when the total height of the middle layer of a web page is greater than the value of XX in html{height:XX px;}, html{height:XX px;} will naturally have no effect.

Solution:

For web page codes written by software like this, unnecessary blank spaces can be removed from the web page by looking for the definition of layer or table height in CSS and then modifying the height value.

<<:  Thumbnail hover effect implemented with CSS3

>>:  A brief discussion on the application of Html web page table structured markup

Recommend

Vue uses rules to implement form field validation

There are many ways to write and validate form fi...

Steps to deploy Docker project in IDEA

Now most projects have begun to be deployed on Do...

Common parameters of IE web page pop-up windows can be set by yourself

The pop-up has nothing to do with whether your cur...

Detailed explanation of MySQL three-value logic and NULL

Table of contents What is NULL Two kinds of NULL ...

How to use Dockerfile to create a mirror of the Java runtime environment

The current environment is: Centos 7.5 docker-ce ...

JavaScript to implement image preloading and lazy loading

This article shares the specific code for impleme...

Django online deployment method of Apache

environment: 1. Windows Server 2016 Datacenter 64...

Detailed explanation of incompatible changes in rendering functions in Vue3

Table of contents Rendering API changes Render fu...

Summary of js execution context and scope

Table of contents Preface text 1. Concepts relate...

The phenomenon of margin-top collapse and the specific solution

What is margin-top collapse Margin-top collapse i...

Semanticization of HTML tags (including H5)

introduce HTML provides the contextual structure ...

VUE implements bottom suction button

This article example shares the specific code of ...

About the pitfalls of implementing specified encoding in MySQL

Written in front Environment: MySQL 5.7+, MySQL d...

Explain the difference between iframe and frame in HTML with examples

I don't know if you have used the frameset at...