CSS bug jingle, quick remember CSS bug handling method

Source: Internet
Author: User

CSS there are bugs, but how can we remember these bugs, so that in the future to write CSS code can be a good response, this is not, the conscientious to write such a CSS bug jingle, or very good:

One, ie border if no, should pay attention to, must be the height set has been forgotten;

Two, the float has the reason, wants the parent layer to contain, follows floats to be clear, the container naturally to be obvious therein;

Three or three pixel text slow move don't panic, height settings help you busy;

Four, compatible with each browsing should note that the default set row height may be the killer;

Five, independent clearance float to bear in mind, row height set no, high set 0, design effect and browsing;

Six, the study layout must train of thought, the road along with the layout principle natural straight, easy to control the HTML, the water flow layout less hack, the code is refreshing, is compatible, the friendly engine likes welcoming.

Seven, all tags have the source, but the default is different, span is the infinite, the two instrument----inline and block-level, IMG more special, but also in compliance with the law, the other just to change the different, a * number all to the original, cascading style to practice more, all things are law.

Eight, the picture link typesetting must be careful, picture link text link if alignment, padding and vertical-align:middle to set, although the difference is fine.

Nine, ie floating bilateral distance, please use display:inline detention.

Ten, the list of horizontal layout, list code must be close to, the gap from the elimination of the need to remember.

How, is not in the mind clear some, at least for later on the preparation of CSS helpful.

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.