Home > Web Front-end > HTML Tutorial > Several methods of making thin lines in DIV and CSS typesetting (translated)_html/css_WEB-ITnose

Several methods of making thin lines in DIV and CSS typesetting (translated)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:09
Original
1022 people have browsed it

When I was making the height control of div today, I found that controlling the height of div under IE was invalid when it was very small, so I checked the relevant articles.

Finally we have a solution, refer to the following article:

If you want to make a line with a height less than 12PX (approximately), it will be displayed higher than the actual height in IE, see below.



It can be seen that the actual height is greater than 6PX, which can be regarded as a BUG of IE. The following three methods can solve this problem. It is recommended to use the first method.
1:



3: