Before IE7, we often use!important in the layout to solve the difference between IE and FF; But after the IE7 out,!important to IE7 will not work, and sometimes IE7 interpretation method and FF and IE6 different, then the new problem arises, with!important can solve IE6 but not solve IE7; This way you can see the same Web page in different browsers with different effects;
This is the day before the layout of a problem, you can first look at the effect; http://www.zishu.cn/blogview.asp?logID=553
or run the code below to see the same effect:
Copy CodeThe code is as follows:
<title>zishu.cn Test</title>
- 64d/47 hitsPixu
- 24d/35 hits scholar
- 66d/87 hits revealed
- 40d/34 hits Livid
- 47d/56 hits Lao Meng
- 42d/36hits Little Jade
- 63d/67 hitsPixu
In this example, if I put
Program code
*+html #zishu_test li A:hover span {margin-left:-8px;} /* ie7*/
This line is deleted; then in the IE7, there will be a difference;
In order to solve this problem, I looked; a method inside the http://www.blueidea.com/tech/site/2006/3626.asp; But if the programmer and the layout are not the same person, such a method is very difficult to control; So there is the method below;
The following is the code;
Program code
Copy CodeThe code is as follows:
* HTML #zishu_test li a:hover span {margin-left:-8px;}/* IE6 */
*+html #zishu_test li A:hover span {margin-left:-8px;} /* ie7*/
This is the two methods for IE6 and IE7;
"*+html" is used by IE7 and ie5.01, and the distinction between IE7 and ie5.01 has a very simple method, is important, write important in front, so as to form a separate approach to IE7 hack.
Like what:
*+html Div. IE7 {
width:200px;!important;
width:100px;
}