To solve the highly adaptive problem between IE and Firefox

Source: Internet
Author: User
Firefox andIEDivHighly adaptiveSolution and Adaptive Background Color (15:18:30)
Tags: it

Div + CSS page designers will encounter such problems, in the Firefox browser belowHighly adaptiveOr the adaptive problem of the background color. Let's take a look at this little experience.

SolutionIEAnd FirefoxHighly adaptiveThe problem requires three parameters;

Height: height;
Min-Height: Minimum height (for Firefox only,IEThe tag is not recognized)
! Important: Important, advance; (when the label appears in the same selector, Firefox takes priority.IEThe last attribute is executed by default ;)
      
Note: If you want to set a height and adapt the height to content changes, pay attention to the order of writing and sending. The following is the correct sequence of definition;

Height: Auto! Important; Min-Height: 388px; Height: pixel PX;

When the DIV has a background color, the DIV is opened, but the background color is not. You only need to add the followingCodeYou can.
Overflow: hidden;

Adaptive height Div line feed
In some cases, although the DIV is opened, the next row of divs that are not fully filled will be followed by those that are not fully filled, you can add overflow: hidden to a div that is not fully filled;The next row of Div will not be followed by it, and will start another row.

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.