Ecommerce, SEO, Gadgets, Mac und Internet Themen

IE6 max-width und min-width

Kategorie: web-development

Die sicherste Methode, die ich bisher angewandt habe ist die Einbindung einer Javascript Expression innerhalb der IE6 fix CSS Datei (Mit Conditional Comments speziell dem IE6 zugewiesene CSS Datei).

# max-width:577px;
.class img{
  width: expression(this.width > 577 ? 577: true);
}

# min-width:577px;
.class div{
  width: expression(this.width < 577 ? 577: true);
}

IE6 Printing CSS

Kategorie: web-development
@media print {   
   #menu, #logo, #sidebar {display: none; }
}

via Ease the Pain with IE6 Printing – IEBlog – Site Home – MSDN Blogs.

Element Transparenz für alle Browser

Kategorie: web-development

Element Transparenz für alle Browser:

/* ie8 */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";

/* ie  5/7*/
filter:alpha(opacity=60);    

/* old mozilla browser like netscape  */
-moz-opacity:0.6; 

 /* for really really old safari */
-khtml-opacity: 0.6;    

/* css standard, currently it works in most modern browsers like firefox,  */
opacity: 0.8;    

Falls jQuery bereits eingebunden ist, schauen die Transparenzübergänge mittels jQuery aber besser aus.

$('#clickme').click(function() {
    $('#book').fadeTo('slow', 0.5, function() {
      // Animation complete.
    });
  });

[jQuery API]

min-height für den IE

Kategorie: web-development

Wie bekommt man ohne hack die nicht vorhandene min-height CSS- Eigenschaft im IE6?
Ganz einfach:

.minheight-500 {
   min-height: 500px;
   height: auto !important; /* für moderne Browser */
   height:500px;  /*für den IE */
}

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]><!--> HTML <!--<![endif]-->

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 »


Autor dieses Blogs
Viktor Dite bei Google+ Viktor Dite bei Twitter

Webworker & Blogger