How to use font-size to define as 0 under IE6
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!