Some of the problems are the browser itself, and the problem can not be avoided, it is necessary to consider the use of some CSS hack, the following is for
Some of the CSS hack that ie6,ie7 and Firefox can use:
(1)
A: For the difference between IE6 and Ie7/firefox, you can follow the code to distinguish between the following!important
Note: IE6 also knows!important, as long as IE7/IE8/FF takes precedence over the properties of!important.
Example: #test {
Float:left;
(1)
(2)
}
Final display: IE6 test is red, and Ie7/ie8/ff first executes (1), so test is blue
B: For Ie7/firefox in front of the CSS add [xmlns], such as the Left property below, if I want to only work for Ie7/ie8/firefox, the wording as
Under
[xmlns] #ltest {
line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " > border:4px solid #999;
padding:5px;
width:200px;
height:200px;
}
C: only works for IE6
(1) You can underline the attribute before it:
*html #test {
_ line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " }
(2) You can add HTML to the front of the CSS, such as:
*html #test {
line-height:28px; Color:rgb (101, 95, 87); font-size:16px; Orphans:2; Widows:2; " }
D: Only for IE7 function, in front of the CSS add *+html, such as:
*+html #test {
}
E: For IE6/IE7/IE8 awareness, FF does not know, after the CSS property value plus \9, such as:
#test {
}
(2)
Downgrade all browsers above IE7 to IE7 without adjusting IE8 and the above compatibility
Source: http://xiaogai1010.blog.163.com/blog/static/137170308201224094398/
Compatible with some of the CSS hack that ie6,ie7 and Firefox can use: