Summary of methods for creating thin lines in DIV and CSS layout_Experience exchange

WBOY
Release: 2016-05-16 12:07:35
Original
1490 people have browsed it

When I was making 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 related 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.

Copy code The code is as follows:




Yes 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:

Copy code The code is as follows:




2. Add a space between divs Note: IE5.0 is invalid

Copy code span> code is as follows:




3:

Copy code The code is as follows:



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!