Several style definition statements of CSS should be noted in multiple browsers

Source: Internet
Author: User

Recently, Div, UL, and CSS are everywhere. My colleagues make a summary. It's good. The post is here.

1. UL labels have list-style and padding by default under ff, and IE has margin by default. the most suitable method is UL {list-style: none; margin: 0; padding: 0 ;}

2. Questions about height
If the content is added dynamically, do not define the height. It is best to set the height of static content.

3. Div highly adaptive
In ff, when div is nested with a float Div, the height of the external Div may not be adaptive. The solution can be to add <Div style = "clear: both "> </div>

4. FF, two divs are tied. One Div uses float, and the other does not use float. In this way, the two divs overlap and must be closed between the two divs.Code<Div style = "clear: both"> </div>)

5. FF, when defining the left and right structure of float, the right structure Div must be set with width. If it is not, 100% will be recognized, resulting in incorrect rows.

6. cursor: pointer can display the cursor finger in IE ff at the same time, and hand can only be Ie.

Finally, my colleague said: "In FF's normal opera, Netscape is basically normal, so we are harmed by Microsoft ".

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.