lunedì, settembre 10, 2007

Hack per CSS

I browser non rispondno sempre allo stesso modo ai css e spesso si tratta di fare in modo che tutti faccinao nella stessa maniera: qui un prontuario riportato anche di seguito

Default paragraphs in this page have yellow background.
Note: "All" == IE5+/Win, Op6+, Moz, IE5/Mac, Saf (, Konq?, iCab?)

IE5/Mac only
/*\*//*/ selector { property: value; } /**/
If this has blue background then the rule is applied.

IE5/Mac only
* html>body selector { property: value; }
If this has blue background then the rule is applied.

IE6-/Win only
/*\*/ * html selector { property: value; } /**/
If this has blue background then the rule is applied.

IE5.5-/Win only
* html selector { property: value; p\roperty: normal-value; }
If this has blue background then the rule is applied.


IE5.5-/Win only

selector { property: value; p\roperty: normal-value; }
If this has blue background then the rule is applied.

IE7 only
*+html selector { property: value; }
If this has blue background then the rule is applied.

All except IE5/Mac
/*\*/ selector { property: value; } /**/
If this has blue background then the rule is applied.

All except IE5/Mac
@media all { selector { property: value; } }
If this has blue background then the rule is applied.

All except IE6-/Win

html>body selector { property: value; }
If this has blue background then the rule is applied.

IE 6, 5.5 /Win only
* html selector { property/**/: value; }
If this has blue background then the rule is applied.

All except IE6/Win
selector { property /**/: value; }
If this has blue background then the rule is applied.

All except IE5.5/Win

selector { property: /**/value; }
If this has blue background then the rule is applied.

Op7+ only (and Saf 3?)
@media all and (min-width: 0px) { selector { property: value; } }
If this has blue background then the rule is applied.

Saf 3 only?
body:first-of-type selector { property: value; }
If this has blue background then the rule is applied.

Nessun commento: