Jul 13, 20101
Safari Only CSS Styles
Kategorie: web-development
Styles, auf die ausschließlich der Safari (Webkit) hört kann man mit:
@media screen
and (-webkit-min-device-pixel-ratio:0)
{
#id1 {margin: xx px;}
.class1 {margin-bottom: xx px;}
}
definieren.
Mrz 31, 20090
Browserswitch — zwischen IE und FF unterscheiden
Kategorie: web-development
Die Lösung heißt: conditional comments
Normal comment: <!-- Comment text -->
Conditional comment: <!--[If expression]> HTML <![endif]-->
Für den einfachsten Switch bedeutet dies:
<!--[If IE]> HTML <![endif]-->
Hier wird jeder IE (ab v5) den eingeklammerten HTML code ausführen
Die umgekehrte Richtung geht leider nur mit einem nicht XHTML validen code, nämlich:
<!--[if !IE]>
Das Ganze geht auch komplexer:
- ! (negation)
Use the negation to select all versions except the one specified, e.g.
[If !IE 6]will select IE 5, 5.5 and 7. - lt (less than)
Select any versions less than the one specified, e.g.[If lt IE 6]will select IE 5 and 5.5. - lte (less than or equal)
e.g.[If lte IE 6]will select IE 5, 5.5 and 6. - gt (greater than)
Select any versions greater than the one specified, e.g.[If gt IE 6]will select IE 7 (and any later versions that may appear). - gte (greater than or equal)
e.g.[If gte IE 6]will select IE 6 and 7 (and later).
Für weitere Informationen [Quelle]
Weiterlesen: Browserswitch — zwischen IE und FF unterscheiden »




