I have a good understanding of CSS styles for web development, so that all browsers can correctly parse webpages. Today, let's talk about padding first.
When creating a webpage, it is displayed normally under IE7, and some hack methods are basically solved in IE6, that is, there is still a problem in IE8 and Firefox, And the compatibility problem is really broken down.
Assume that a padding value is set, which is different in FF, IE8, and IE6.
The first consideration is the FF value.
. Test {padding: 10px}
Then consider the value in IE8.
. Test {padding: 10px; * padding: 9px}
Finally, consider the value in IE6.
. Test {padding: 10px; * padding: 9px; _ padding: 8px}
In this way, you can. For compatibility, we should first consider ff and opera browsers, and finally consider ie6. In the preceding example, both IE8 and IE6 can recognize *, but FF cannot. Therefore, use * as the hack of IE8, but _ is not recognized in ff and IE8, and only IE6 can recognize it. Therefore, use _ as the hack of IE6.
After <meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/> is added to the other two pages, IE8 is displayed as normal, it is still an old problem to add this sentence on the third-level page. There is a lot of gap between the layer and the layer.
For details, see your CSS and HTML.Code.
Add <meta http-equiv = "X-UA-compatible" content = "Ie = 7"/> or <meta http-equiv = "X-UA-compatible" content = "Ie = emulateie7"/> tells IE8 to use IE7 compatibility mode for page resolution. If your CSS definition has problems, simply adding this will not solve the problem.
From: http://www.laoy8.cn/Html? 456777. html