Three methods for creating fine lines in Div + CSS layout-for IE

Source: Internet
Author: User
More articles about CSS layout, obstacle-free Website access, and website affinity.

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

. Line10 {Background: # cccccc; Height: 6px ;}

It can be seen that the actual height is greater than 6px, which is also a bug in IE. The following three methods can solve this problem. The first method is recommended.

1.

. Line11 {Background: # cccccc; Height: 6px; overflow: hidden ;}
<Div class = "line11"> </div>

2.Add a space between the Div. Note: ie5.0 is invalid.

. Line12 {Background: #336699; line-Height: 6px ;}
<Div class = "line12"> & nbsp; </div>

3.

. Line13 {Background: # cc0000; Height: 6px; font-size: 1px ;}
<Div class = "line13"> </div>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.