In IE 6, how does one set the div height? in IE6, how does one set the div height?

Source: Internet
Author: User

In IE 6, how does one set the div height? in IE6, how does one set the div height?

In IE 6, how do I set the div height:
Suggestion: writing code as much as possible can effectively improve learning efficiency and depth.
In IE6, we may not be able to set the height of a div as we like, because in IE6, the height of a div seems to be associated with the font size, if you do not set the font size, you cannot set the height of the div to a size smaller than 12 PX. For example:

<! DOCTYPE html> 

The above code is normal in a standard browser, but in IE6, The div height cannot be set to 5px, and the height is still 12px. The solution is to set the div font size to 0 PX, and then you can set a smaller height, but the minimum height can only be set to 2 PX.

<! DOCTYPE html> 

If you want the div height to be set at will under IE6, you need to add overflow: hidden. For example:

<! DOCTYPE html> 

The above code can set the height of the div as you like.

Original address: http://www.51texiao.cn/div_cssjiaocheng/2015/0429/415.html

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.