Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that the height of div must be greater than the height of font in IE environment

Shulou Source: shulou.com Published: 2022-06-03 06:08:05 11月17日 Update

This article mainly introduces the IE environment how to solve the problem that the height of the div must be greater than the height of the font, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

The code is as follows:

...

According to the search, the original IE stipulates that the height of the div box must be higher than the font height of the box. The height set in the web page defaults to 12px. Therefore, setting the div height to 10px is bound to fail.

The solution is simply to set the size of the div font to 0 so that the height of the div setting works and the web page returns to normal.

Thank you for reading this article carefully. I hope the article "how to solve the problem that div height must be greater than font height" shared by the editor is helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Height font article environment problem web page code value interest at the same time necessity method more friends knowledge editing industry information information channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Huawei NVidia MariaDB