If you encounter a BUG when laying out CSS web pages, please read the following content carefully. It is very easy to remember. I wonder which expert has compiled the CSS BUG into a jingle! See if you can remember it well?
1. If the IE border appears or disappears, please note that the height setting must have been forgotten;
2. Floats are created for a reason. If the parent layer wants to contain them, then the floats need to be cleared, and the container will naturally appear in it;
3. Don’t panic when moving three-pixel text slowly, the height setting can help you;
4. Compatibility with various browsers. Please note that the default row height setting may be a killer;
5. When clearing floats independently, please keep in mind that row height is set to none and height is set to zero, and the design effect is concurrent with browsing;
6. Learning layout requires ideas. The path follows the layout principle. It is natural and straight, and it is easy to control HTML. The streamlined layout has less hacks, the code is clean, the compatibility is good, and the friendly engine likes to welcome it.
7. All tags are active, but the defaults are different. span is Wuji, and Wuji produces two things - inline and block level. img is special, but it also follows the legal principles. Others are just different modifications. A * sign will all return to the original. The cascading style requires a lot of practice, and everything is regular.
8. Be careful with the layout of image links. If the image links and text links are aligned, padding and vertical-align:middle must be set. It doesn’t matter if the difference is slight.
9. For IE floating double margins, please use display: inline.
10. The list should be typed horizontally, the list codes must be close together, and the gaps must be remembered.