CSS Div Minimum Height in IE 6 and IE 7 compatibility issues _ Experience Exchange

Source: Internet
Author: User
Browser compatibility issues-css Div minimum height in IE 6 and IE 7 compatibility issues

CSS to define the height of a div, in IE 7 browser can be displayed normally. But in IE 6, the height below 10px cannot be defined. This is a bit similar to the table. The solution is as follows:

Method One: Define the overflow attribute. For example, to define a line with a height of 2px.
<div style= "Height:2px;overflow:hidden;background: #000000; width:778px;" ></div> II: Set the div font Size property fontsize to be the same as the height.
<div style= "Height:2px;font-size:2px;background: #000000; width:778px;" >&nbps;</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.