Style sheet CSS layout experience _css/html

Source: Internet
Author: User
With the accumulation of time here will be added or modified, I hope that the following things to the later standard learners will be some help, or useless.

The main content is the difference between IE and Mozilla and easy to overlook the details, some of the best implementations of classic applications should avoid offending errors.

Because it is the accumulation of their usual experience, will inevitably appear some wrong explanation, such as fortunate to be seen, please be sure to point out, first thanked.

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.

A stupid way to adjust the compatibility (ie and Mozilla):

Beginners may encounter such a situation: the same Tag property in IE is set to a display is normal, and in Mozilla must be set to B in order to display normally, or two upside down.

Interim workaround:

Selector {property name: B!important; property name: A;}

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 image 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

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