Get the App
SLTechnology News&Howtos  ›  Development  › 

How to operate div minimum height removal and Vertical centering css style in IE6

Shulou Source: shulou.com Published: 2022-06-03 14:02:07 11月14日 Update

In this issue, the editor will bring you about how to operate the div minimum height removal and vertical center css style in IE6. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

Div minimum height removal method:

In IE6, when using CSS to define the height of DIV, you often encounter this problem, that is, when the minimum height of DIV is less than a certain value, you will find that no matter how you set the minimum height, the height of Div will be fixed at a value that will no longer change. This problem is very annoying. Such as the following situation.

HTML code

The code is as follows:

This is because in IE6, the system default is not Div has a default height, but you did not solve a hidden parameter, font-size, this is ie6 for the Div attribute of the font-size size and your system css definition of font-size has a lot to do, so you must define the font-size of this Div separately, in order to solve this problem. The changed code is as follows.

HTML code

The code is as follows:

Div is vertically centered:

Html:

The code is as follows:

Css:

The code is as follows:

# loginbox {width:348px; height:383px; position: absolute; left:50%; top:50%; margin-left:-174px; margin-top:-250px;} the above is shared by the editor on how to operate the div minimum height removal and vertical center css style in IE6. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Height code minimum problem style content that is system analysis large annoying professional small and medium rich in content method parameter size attribute situation article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Redmi Shulou Tech Info NVidia