CSS style Sheet Common Tips Collection _ Experience Exchange

Source: Internet
Author: User
· UL tags in Mozilla default is padding value, and in IE only margin has value.

· The same class selector can be repeated in one document, but the ID selector can only occur once, CSS is defined using class and ID for a tag, and if the definition is duplicated, the definition of the ID selector is valid.

· Beginners may encounter such a situation, the same tag properties in IE set to a display is normal, and in Mozilla must be set to B to normal display, or two upside down.
Temporary workaround: The selector {property name: B!important; property name: A;}//ie7 Invalid

· If there is a need for spacing between a set of tags to be nested, leave the margin property of the label on the inside, rather than defining the padding of the label on the outside

· The icon in front of the Li Tag recommends using background-image instead of List-style-image

· IE can not tell the difference between the inheritance and the parent-child relationship, all of them are inheritance relations.

· When adding a selector to your tag, don't forget to annotate the selector in CSS. When you change your CSS later, you'll know why.

· If you give a label a dark-toned background picture and a bright-toned text effect. It is recommended that you set a dark-toned background color for your label at this time.

· Define the four states of the link to note the sequencing: Link visited Hover Active

· For images unrelated to the content, please use background

· The definition color can be abbreviated #8899FF = #89F

· Table is much better than other labels in some ways. Please use it where you want the column to be aligned.

·
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.