Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use font-size to define as 0 under IE6

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

How to define font-size as 0 under IE6? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

When I am working on a website project, I usually need to define a div with a height below 10px. The code is as follows:

The code is as follows:

Untitled document

It means to define a div with a height of 8px and blue background. The actual results of each browse are as follows:

In the past, my way to solve this problem under IE6.0 was to add overflow:hidden.

The code is as follows:

Because add overflow:hidden sometimes there will be a lot of problems.

I looked through the information on the Internet and found that the reason for the extra height under IE6.0 is because: if the font size is not defined for div, the default is font-size;12px. So defining font-size as 0 can solve the problem.

The code is as follows:

Untitled document

The actual results of each browse are as follows:

After reading the above, have you mastered how to use the font-size definition as 0 under IE6? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Problem code method height content reason reality effect document more title browsing helpless for this size font this situation meaning skill Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information vpn Huawei Shulou Technology