How to make fine lines in Div and CSS typesetting summary _ Experience Exchange

Source: Internet
Author: User
Today to make div height control when found ie control div height is very small when invalid, deliberately checked the relevant articles.

Finally, with the solution, refer to the following article:

If you want to make a line that is less than 12PX (approx.), it will show up above the actual height in IE, see below.

Copy Code code as follows:

<style>
. line{
Background: #CCCCCC;
height:6px;
}</style>
<div class= "line" ></div>

Can be seen that the actual height of more than 6PX, which is also a bug bar ie. Here are three ways to solve this problem, and the first method is recommended.
1:

Copy Code code as follows:

<style>
. line11{
Background: #CCCCCC;
height:6px;
Overflow:hidden;
}</style>
<div class= "Line11" ></div>

2. Between div to add a space note: IE5.0 invalid

Copy Code code as follows:

<style>
. line12{
Background: #336699;
line-height:6px;
}</style>
<div class= "Line12" > </div>

3:

Copy Code code as follows:

<style> 
.line13{ 
background:  #CC0000;  
height: 6px; 
font-size: 1px; 
}</style> 
<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.