Optimization for ie
Sometimes, you need to define some extraordinary rules for IE browser bugs. Here there are too many css tutorial skills (hacks). I only use either of them, whether Microsoft is better able to support css in the upcoming ie7 beta version, these two methods are the safest.
1. Annotation method
(A) hide a css definition in ie. You can use the child selector ):
Html> body p {
/* Definition content */
}
(B) the following statement can only be understood by IE (hidden from other browsers ):
* Html p {
/* Declarations */
}
(C) sometimes you want ie/win to be valid while ie/mac is hidden. You can use the "backslash" technique:
/**/
* Html p {
Declarations
}
/**/
2. conditional comments
Another method, I think, is better than css hacks, is to use Microsoft's proprietary attribute condition comments ). With this method, you can define some styles for ie separately without affecting the definition of the main style table, just like this:
<! -- [If ie]>
<Link rel = "stylesheet" type = "text/css" href = "ie.css"/>
<! [Endif] -->