Difference between CSS display and IE in non-mainstream browser Nascape

Source: Internet
Author: User

Although Nascape is a non-mainstream browser. However, from the study of differences in display, we can still learn a lot about compatibility and expand our thinking.
One of the most difficult cases we have to deal with when deploying a web page is that the same CSS code is interpreted by different browsers to produce different results. In the past, a variety of different browsers generated extremely different pages are everywhere, and now we can use the so-called standard browser to get better results. However, the difference in the display effect cannot be avoided.
    
Some leading browsers have such differences in handling floating effects. If someone wants to create a layout that can dynamically change the size of multiple columns as the size of the browser window changes, this will be a particularly troublesome issue.
Simple non-floating page
Suppose you have two divdiv # one and div # two, both of which have fixed width. Without floating or absolute positioning, these divs will be placed on the left side of the browser window in the form of one stacked on the other (as shown in example ), because the standard page is arranged from left to right, from top to bottom, block-level elements will start a new row next to the previous element.
Below is a piece of HTML required for all examples:
<Body>
<Div id = "one">
Port side text...
</Div>
<Div id = "two">
Second column text...
</Div>
</Body>
The following CSS code is used for basic, non-floating versions:
Div # one {
Width: 150px;
Margin: 0px;
Background-color: red;
}
Div # two {
Width: 300px;
Padding: 0px 10px 5px 10px;
Margin: 0px;
Background-color: silver;

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.