CSS - Hacks: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
(comment5, http://buy-cialis-cheaper.com/important-things-to-discuss-with-your-doctor.html cheap cialis, http://buying-propecia.com/am-i-likely-to-get-side-effects.html Propecia, http://buying-doxycycl)
 
(275 dazwischenliegende Versionen von mehr als 100 Benutzern, die nicht angezeigt werden)
Zeile 1: Zeile 1:
comment5, http://buy-cialis-cheaper.com/important-things-to-discuss-with-your-doctor.html cheap cialis, http://buying-propecia.com/am-i-likely-to-get-side-effects.html Propecia, http://buying-doxycycline.com/ order doxycycline, http://ordering-levitra.com/what-you-need-to-tell-your-doctor-about.html book buy, http://buy-viagra-safely.com/ viagra, http://ordering-cialis.com/erectile-dysfunction.html cialis.com, http://best-replica-watches-ever.com/best-swiss-replica-watches.html Replica Watches, http://buying-cipro.com/things-to-consider-before-taking-cipro.html 250 cipro mg, http://ordering-viagra.com/index.html Viagra, http://buy-davidoff-cigarettes.com/davidoff-cigarettes-online.html Davidoff, http://weightloss-herbal-supplements.com buy hoodia gordonii, http://best-herbal-remedies-shop.com/treat-impotence-fast-using-herbal-treatment.html herbal impotence treatment,, http://online-dating-free-services.com/adult-dating.html adult dating au, http://acompliacentral.com/important-safety-information.html acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|acomplia|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|buy acomplia|buy acomplia online|acomplia online|cheap acomplia|generic acomplia|buy acomplia|buy acomplia online|acomplia online|cheap acomplia|generic acomplia|buy acomplia|buy acomplia online|acomplia online|cheap acomplia|generic acomplia|buy acomplia|buy acomplia online|acomplia online|cheap acomplia|generic acomplia|acomplia online|aventis acomplia|buy acomplia online|acomplia dosage|acomplia without prescription|buy acomplia|acomplia rimonabant|online acomplia|acomplia no prescription|cheap acomplia|acomplia online|aventis acomplia|buy acomplia online|acomplia dosage|acomplia without prescription|buy acomplia|acomplia rimonabant|online acomplia|acomplia no prescription|cheap acomplia|acomplia online|aventis acomplia|buy acomplia online|acomplia dosage|acomplia without prescription|buy acomplia|acomplia rimonabant|online acomplia|acomplia no prescription|cheap acomplia|acomplia online|aventis acomplia|buy acomplia online|acomplia dosage|acomplia without prescription|buy acomplia|acomplia rimonabant|online acomplia|acomplia no prescription|cheap acomplia|acomplia online|aventis acomplia|buy acomplia online|acomplia dosage|acomplia without prescription|buy acomplia|acomplia rimonabant|online acomplia|acomplia no prescription|cheap acomplia|acomplia testimonials|acomplia diet pills|order acomplia|acomplia rimonabant zimulti|acomplia buy|rimonabant acomplia|acomplia discount|acomplia pictures|acomplia on line purchase|medicine acomplia|sanofi-aventis and acomplia|acomplia cheap no prescription|generic acomplia|does acomplia work|acomplia reviews|acomplia groups|acomplia generic|licensed pharmacy for acomplia|acomplia stop taking|buy cheap acomplia|acomplia zimulti|acomplia no script|acomplia fda approval|what is acomplia|purchase acomplia|where to buy acomplia|acomplia uk|acomplia no prescription needed|acomplia rimonabant overnight|acomplia diet pill|acomplia overnight no rx|zimulti acomplia|acomplia 56|acomplia and sanofi-aventis|acomplia no prescription necessary|acomplia rimonabant pill|acomplia fda|no rx acomplia|acomplia cheapest no prescription|acomplia buy in usa|prescription medication acomplia|acomplia diet|acomplia mexico|acomplia rimonabant profile|acomplia receptors|acomplia scam|acomplia side effects|acomplia weight loss|cheapest acomplia|acomplia no rx pharmacy|acomplia order|buy acomplia rimonabant|buying acomplia,, http://better-auto-insurance-quotes.com/how-to-benefit-from-buying-car-insurance-online.html Auto Insurance, http://buying-tetracycline.com/tetracycline-things-to-be-aware-of.html tetracyclines, http://levaquin.cc/disease.html levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|levaquin|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|here is the information|here is the info|watch it here|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|here is the information|here is the info|watch it here|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|here is the information|here is the info|watch it here|watch this site|watch this|watch here|search on this website|here is the link|here is the url|here is the website|here is the site|here is the information|here is the info|watch it here|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|buy levaquin|buy levaquin online|levaquin online|cheap levaquin|generic levaquin|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin side effects|levaquin 500mg|side effects of levaquin|levaquin used to treat|levaquin antibiotic|alcohol and levaquin|what is levaquin|levaquin 500 mg|levaquin tendons|levaquin 750mg|levaquin levofloxacin|levaquin dosage|levaquin sulfa side effects|levaquin and cats|levaquin alcohol|levaquin reactiions|levaquin 750 mg|levaquin joint pain|levaquin and prostatitis|levaquin muscle pain|levaquin prescription drug|levaquin uses|levaquin alternatives|renal dosing for levaquin|levaquin 750|levofloxacin levaquin|levaquin generic|levaquin ingredients|levaquin tendonitis|levaquin product safety|sideeffects of levaquin|levaquin uses in utis|levaquin adverse events|levaquin rash|levaquin reaction|levaquin overdose|levaquin 5|side effects levaquin|antibiotic levaquin side effects|levaquin avelox|generic levaquin|levaquin dosing|levaquin issues|buy levaquin|levaquin side effect|levaquin drug interactions|levaquin medication|antibiotic levaquin|levaquin 500mg tab|will levaquin cure strep|levaquin tablet|levaquin and pregnancy|levaquin sinusitis|levaquin tablets|allergic reaction levaquin|levaquin price|levaquin medicine|gonorrehea treatments levaquin|levaquin tendon|levaquin blindness|levaquin poisoning|levaquin before biopsy|levaquin wiki|levaquin coumadin|levaquin side affects|levaquin class action suit|levaquin birth control|cvs levaquin|uses of levaquin|avelox difference between levaquin|cipro vs levaquin|levaquin manufacturer|levaquin fights cancer|levaquin and doxycycline interaction|levaquin and alcohol|levaquin and side effects|levaquin vs cipro|levaquin and prednisone|levaquin adverse reactions|levaquin tab|levaquin otc drug|levaquin and biaxin|levaquin allergic reaction|levaquin info|levaquin in acne treatment|levaquin iv|levaquin interactions|levaquin high dose|levaquin alcohol interaction|levaquin 250mg|levaquin for uti|levaquin litigation|what is levaquin for|levaquin rxlist|levaquin cipro|levaquin and doxycycline pneumonia|levaquin side effects testing|levaquin sonata|who makes levaquin|side effects for levaquin|levaquin class action|levaquin sun exposure|levaquin and doxycycline|levaquin skin rash treatment|uses for levaquin|levaquin phentramine|tendonitis and levaquin|levaquin sonata wellbutrin|levaquin 500mg side effects|drug levaquin|levaquin prostate|chest pain and levaquin|what does levaquin treat|levaquin rebate|allergic reaction to levaquin|dosage for levaquin|fda report on levaquin|levaquin 750mg and alcohol|levaquin com infection pneumonia|online levaquin canada|levaquin dangers|levaquin dosages for kids|levaquin valium|levaquin breastfeeding|reversing levaquin muscle pain|purchase levaquin online|levaquin and metabolism change|levaquin and doxycycline together|pepsid levaquin|levaquin doxycycline interaction|levaquin therapy|s levaquin|levaquin manufacturer|levaquin fights cancer|levaquin and doxycycline interaction|levaquin and alcohol|levaquin and side effects|levaquin vs cipro|levaquin and prednisone|levaquin adverse reactions|levaquin tab|levaquin otc drug|levaquin and biaxin|levaquin allergic reaction|levaquin info|levaquin in acne treatment|levaquin iv|levaquin interactions|levaquin high dose|levaquin alcohol interaction|levaquin 250mg|levaquin for uti|levaquin litigation|what is levaquin for|levaquin rxlist|levaquin cipro|levaquin and doxycycline pneumonia|levaquin side effects testing|levaquin sonata|who makes levaquin|side effects for levaquin|levaquin class action|levaquin sun exposure|levaquin and doxycycline|levaquin skin rash treatment|uses for levaquin|levaquin phentramine|tendonitis and levaquin|levaquin sonata wellbutrin|levaquin 500mg side effects|drug levaquin|levaquin prostate|chest pain and levaquin|what does levaquin treat|levaquin rebate|allergic reaction to levaquin|dosage for levaquin|fda report on levaquin|levaquin 750mg and alcohol|levaquin com infection pneumonia|online levaquin canada|levaquin dangers|levaquin dosages for kids|levaquin valium|levaquin breastfeeding|reversing levaquin muscle pain|purchase levaquin online|levaquin and metabolism change|levaquin and doxycycline together|pepsid levaquin|levaquin doxycycline interaction|levaquin therapy|levaquin every 12 hours|levaquin als|levaquin administration|taking levaquin with ulcers|prescribing information levaquin|when to take levaquin|levaquin ulcers|levaquin sulfa|prescription drugs levaquin|proper dose of levaquin|levaquin tendon problems|levaquin strep throat|250mg levaquin|levaquin usage|webmd levaquin|levaquin warning|levaquin warnings|success of levaquin|levaquin tab 500mg|levaquin uti|what is levaquin 500mg|package insert levaquin|what it levaquin|standard dose of levaquin|uti levaquin|levaquin with biaxin|levaquin and kidney stones|levaquin and naproxen|levaquin and nsaids|levaquin and allergic reaction|levaquin and chemotherapy|levaquin and kidney|levaquin and otitis media|levaquin anti-biotic|levaquin birth control interaction|levaquin birth defects|levaquin and step throat|levaquin and urinating|levaquin and urination|levaquin 750mg side effetcs|buy levaquin online|can dogs take levaquin|cheap levaquin|about levaquin|amiodarone levaquin|antibiotics levaquin|define levaquin|levaquin 500|levaquin 500 mg tablets|levaquin 500mg tablets|generic for levaquin|history of levaquin|levaquin 250|levaquin canada|levaquin knee pain|levaquin law suits|levaquin liver damage|levaquin indications|levaquin iv side effects|levaquin kidney infection|levaquin mechanism of action|levaquin side effec ts|levaquin skin rash|levaquin stomach|levaquin medication used for|levaquin mrsa|levaquin package insert|levaquin for sinus infection|levaquin diabetes|levaquin diarrhea|levaquin diarrhea bacterial infection|levaquin causing early period|levaquin cellulitis|levaquin contraindications|levaquin dosage adult|levaquin drug|levaquin for cats|levaquin for sale|levaquin dosage information|levaquin dosage iv|levaquin dose,, http://buying-propecia.com/discuss-with-the-doctor-before-taking-propecia.html propecia and buy, http://ordering-rimonabant.com/ rimonabant 180 pills, http://choose-health-insurance-quotes.com/free-health-insurance-quotes.html kids health insurance, http://order-replica-watches.com/breitling-replica-watches.html Replica Watches,
+
== Browser Hacks ==
 +
=== IE10, IE11 und Edge ===
 +
<syntaxhighlight lang="css">
 +
@media all and (-ms-high-contrast:none) {
 +
    .beispiel { color: green } /* IE10 & IE11 */
 +
    *::-ms-backdrop, .beispiel { color: red } /* IE11 */
 +
}
 +
 
 +
@supports (-ms-ime-align:auto) {
 +
  .beispiel { color: blue; } /* EDGE (nur alte EDGE) funktioniert 2020 nicht mehr*/
 +
}
 +
</syntaxhighlight>
 +
 
 +
== IE Hacks und IE Switches ==
 +
 
 +
Wie man dem Internet Explorer (und EdgeSonderregeln beibringt.
 +
 
 +
===Internet Explorer Conditions===
 +
 
 +
Generell ist die offizielle von MS empfohlene Methode eine Condition der Form:
 +
<pre>
 +
<!--[if IE]>
 +
<link rel="stylesheet" type="text/css" href="iehacks.css" />
 +
<![endif]-->
 +
 
 +
<!--[if IE 5]>
 +
<link rel="stylesheet" type="text/css" href="iehacks-5.css" />
 +
<![endif]-->
 +
 
 +
<!--[if lt IE 8]>
 +
<link rel="stylesheet" type="text/css" href="iehacks.css" />
 +
<![endif]-->
 +
</pre>
 +
 
 +
lt bedeutet less than. Die Regeln betreffen also aller Versionen unter IE 8 (die es im Moment noch nicht gibt;-) Außerdem gibts noch lte (lower than and equal) und gte (greater than and equal)
 +
important Hack
 +
 
 +
Unter Umständen kann auch die important- Klausel weiterhelfen, die der IE nicht kennt, wohl aber FF/ Opera/ Konqueror; zudem macht man sich dabei keines neuen Bugs zu Hilfe.
 +
 
 +
Wichtig: Immer erst die important- Klausel!
 +
 
 +
Die Klausel bewirkt bei entsprechend kompatiblen Browsern, dass diese Eigenschaft nachfolgend nicht mehr überschrieben werden kann.
 +
 
 +
Beispiel:
 +
<pre>
 +
1. box {
 +
    min-height: 300px;
 +
    height: auto !important;
 +
    height: 300px;
 +
    ...  
 +
}
 +
</pre>
 +
 
 +
=== Star-Plus-HTML-Hack (IE7) ===
 +
Quelle: http://www.css-hack.de/Internet+Explorer/IE+7 (Zugriff: 08/2012)
 +
 
 +
Dem Universal-Selektor * wird ein Plus-Zeichen hinzugefügt. Diese Schreibweise wird lediglich vom IE 7 interpretiert!
 +
<pre>
 +
* + html div {
 +
  width : 20em;
 +
}
 +
</pre>
 +
 
 +
=== Sternchen Hack (IE5,IE6) ===
 +
 
 +
Anwendung: Anweisungen nur für IE 5 und 6 z.B.
 +
 
 +
* html {...} /*das sehen nur IEs*/
 +
 
 +
Zukunftssicher: funktioniert nicht mehr bei IE 7
 +
 
 +
=== Box Model Hack / Tantek Hack ===
 +
 
 +
IE 5 und IE 5.5
 +
 
 +
Anwendung: Box Model Fehler von IE 5/5.5 korrigieren
 +
 
 +
Beispiel:
 +
<pre>
 +
#kasten{
 +
    width: 360px;
 +
}
 +
 
 +
* html #kasten{      /*Das beachten nur IEs*/
 +
    width: 400px;      /* der 'Falsche' Wert für alte IEs */
 +
    w\idth: 360px;      /* das sieht nur der IE 6 */
 +
}
 +
</pre>
 +
Zukunftssicher: ja
 +
 
 +
===Kind Selektor Hack===
 +
 
 +
IE versteht den KindSelektor nicht. Z.B.
 +
 
 +
body > p
 +
 
 +
Anwendung: Höhe nur für IE setzen (IE braucht Höhenangaben z.B. wg. Inline Padding Bug.)
 +
 
 +
Beispiel:
 +
<pre>
 +
#inhalt {height: 100px;}  /*für IE*/
 +
html>body #inhalt {      /*für andere Browser zurücksetzen*/
 +
  height: auto
 +
}
 +
 
 +
</pre>
 +
 
 +
==Browser Bugs==
 +
 
 +
 
 +
IE:mac CSS overflow-Bug
 +
 
 +
Der Internet Explorer für Mac stürzt ab, wenn man overflow: auto auf ein Input-Element des Typs Submit anwendet und auf die Schaltfläche klickt.
 +
 
 +
Lösung/Fix: Statt overflow: auto muss overflow: visible zugewiesen werden.
 +
 
 +
Weitere Info: http://www.bernd-lutz.de/css_overflow-bug_ie_mac-51.php
 +
Box Model Bug
 +
 
 +
IE 5 / 5.5
 +
 
 +
Standard: Elementbreite = width + paddings + margins + borders IE: Elementbreite = width + margin
 +
 
 +
Wenn also eine width und borders bzw. paddings angegeben sind werden die Boxen im IE 5 und 5.5 zu klein weil die paddings und borders nicht dazu gezählt werden. Lösung:
 +
 
 +
  1. Wenn width angegeben kein padding oder border verwenden. Stattdessen Ränder auf die Kindelemente anwenden.
 +
  2. Box Model Hack / Kind Hack
 +
 
 +
=== Kommentar Hack ===
 +
 
 +
Anwendung: vor IE/Mac verstecken z.B. bei 3px Bug der nur in Win Versionen auftaucht.
 +
 
 +
Beispiel (in Kombination mit * Hack)
 +
 
 +
/* Hide from IE5-mac. Only IE-win sees this. \*/
 +
* html #floatbox {
 +
margin-right: 10px;
 +
}
 +
* html p {
 +
height: 1%;
 +
margin-left: 0;
 +
}
 +
/* End hide from IE5/mac */
 +
 
 +
=== Inline Padding Bug ===
 +
 
 +
Horizontales Padding und Margin funktioniert bei Inline-Elementen im IE nur wenn eine Höhe angegeben ist. Dann kann es allerdings zu anderen Seiteneffekten kommen.
 +
 
 +
Lösung Höhe mit Kind Selektor Hack setzen.
 +
3px Bug bei Bildern
 +
 
 +
Oft taucht beim IE im Zusammenhang mit floatenden Elementen eine Lücke unterhalb oder links rechts eines Bildes auf. Selbst eine Höhe für das Div hilft nichts.
 +
 
 +
Lösungsansätze: negatives padding für (Win IEs) overflow: hidden;
 +
Double Margin Bug
 +
 
 +
IE6 und kleiner berechnen den Margin einer floatenden Box manchmal doppelt.
 +
 
 +
This bug only occurs when the float margin goes in the same direction as the float and is trapped directly between the float and the inside edge of the container box. Any following floats with a similar margin won't show the doubled margin. Only the first float in any given float row will suffer from the bug. Also, the doubled margin displays symmetry, working the same way to the right as it does to the left. (Position Is Everything)
 +
 
 +
Lösung: Die floatende box bekommt den Wert:
 +
 
 +
display: inline;
 +
 
 +
Der Bug ist damit behoben und die Box bleibt (nach W3C Definition trotzdem ein Block Element, weil floatende Boxen automatisch immer Block-Elemente werden.
 +
 
 +
=== IE7 Update ===
 +
 
 +
Aus: IE-Blog http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx
 +
Korrigierte Bugs
 +
Bugs we fixed
 +
 
 +
    * All bugs on positioniseverything.net except the “escaping floats” bug (which is planned for the future)
 +
          o Peekaboo Bug
 +
          o Internet Explorer and Expanding Box Problem
 +
          o Quirky Percentages
 +
          o Line-height bug
 +
          o Border Chaos
 +
          o Disappearing List-Background bug
 +
          o Guillotine Bug
 +
          o Unscrollable Content bug
 +
          o Duplicate Characters Bug
 +
          o IE and Italics
 +
          o Doubled Float-Margin bug
 +
          o Duplicate Indent bug
 +
          o Three pixel text jog
 +
          o Creeping Text bug
 +
          o Missing First letter bug
 +
          o Phantom box bug
 +
 
 +
Details on some of the other bugs (from sources other than the positioniseverything.net list) that we fixed:
 +
 
 +
    * Overflow now works correctly! (That means boxes do not automatically grow any more.)
 +
    * Parser bugs: * html, _property and /**/ comment bug
 +
    * Select control: CSS style-able and not always on top
 +
    * Auto-sizing of absolute positioned element with width:auto and right & left (great for 3 column layouts)
 +
    * Addressed many relative positioning issues
 +
    * Addressed many absolute positioned issues
 +
    * % calculations for height/width for abs positioned elements http://channel9.msdn.com/ShowPost.aspx?PostID=191182
 +
    * <?xml> prolog no longer causes quirks mode
 +
    * HTML element truly independent of the Body (now gets its own width, height etc.)
 +
    * 1 px dotted borders no longer render as dashed
 +
    * Bottom margin bug on hover does not collapse margins
 +
    * Several negative margin issues fixed
 +
    * Recalc issues including relative positioning and/or negative margins are fixed now
 +
    * CLSID attribute of <object> tag no longer limited to 128 characters
 +
    *  :first-letter whitespace bug described in http://blogs.msdn.com/ie/archive/2005/09/02/460115.aspx fixed
 +
    * Descendant selector now works properly for grand children when combined with other selectors
 +
    * First-line and first-letter now applies when there is no space between word :first-line and opening brace {
 +
    * Pseudo-classes now are working as expected if selector is excluded
 +
    * The :link selector works now for anchor tag with href set to bookmark
 +
    * Addressed !important issues
 +
    * PositionIsEverything piefecta-rigid.htm now works
 +
    * List-item whitespace bug fixed
 +
    * Fixed Absolutely Buggy II
 +
    * Absolute positioned elements now use always correct containing block for positioning and size information
 +
    * Nested block elements now respect all overflow declarations (hidden, scroll, etc)
 +
    * Fixed the opposing offset problem (absolute positioned element whit all four top, bottom left and right are present)
 +
    * <a> tags nested within LI elements will no longer add extra bottom margin when hover occurs
 +
    * We no longer lose the image aspect ratio on refresh
 +
    * Cleaned up our ident parsing according to CSS2.1 rules
 +
    * Fixed parsing bugs for multi- class selectors and class selectors that are combined with id selectors
 +
    * And many more
 +
 
 +
We also extended our existing implementations to comply with W3C specifications:
 +
 
 +
    * Enable :hover on all elements not just on <a>
 +
    * Background-attachment: fixed works on all elements – so Eric Meyer’s complexspiral demo works
 +
    * Improved <object> fallback
 +
 
 +
Finally, we added new features from CSS2.1:
 +
 
 +
    * Min/max width/height support (also for images, which did not work in IE7b2)
 +
    * Transparent borders
 +
    * Fixed positioning support
 +
    * Selectors: first-child, adjacent, attribute, child
 +
          o A couple of CSS 3 attribute selectors: prefix, suffix and substring since we were working already in the code base (also the general sibling selector)
 +
    * Alpha channel PNG support (Not a CSS feature but too important for designers to not call it out J)
 +
 
 +
Links
 +
 
 +
http://css.nu/pointers/bugs-ie.html 2006-06-29
 +
 
 +
http://websemantics.co.uk/tutorials/useful_css_snippets/
 +
Useful Snippets
 +
 
 +
aus http://websemantics.co.uk/tutorials/useful_css_snippets/
 +
Leveller
 +
 
 +
Versuche alle Browser auf möglichts gleiche Werte 'vorzukonfigurieren'
 +
 
 +
 
 +
* {margin:0; padding:0}
 +
 
 +
Removes margin and padding from every element.
 +
 
 +
html {height:100%}
 +
 
 +
Sets the window height.
 +
 
 +
min-height:101%;
 +
 
 +
Sets the minimum page height to greater than the window height to force Netscape & Firefox to display vertical scrollbars, thereby preventing content jumping on fixed width pages. IE doesn't understand min-height and totally ignores this setting.
 +
 
 +
font:100.01%/130% Verdana, Helvetica, sans-serif;
 +
 
 +
Set font-size to a percentage preventing a Windows IE "extreme font re-sizing" bug. Set font-size slightly larger than 100% to repair Opera rounding errors. Set less than 101% to prevent Safari errors. The line-height setting gives nice, clear and easy-read spacing. Verdana is the most readable, and readily available screen font in Windows. Helvetica most readable, and readily available screen font on Macintosh computers. Sans-serif is the most readable to the widest audience for body text.
 +
 
 +
color:#000; background:#fff;
 +
 
 +
Set general colour & background.
 +
 
 +
width:760px;
 +
 
 +
Fixed width set for 800 pixel wide browser displays.
 +
 
 +
margin:0 auto
 +
 
 +
Margins are set for centring the content. This works for IE6, Firefox, Opera, Safari and Netscape but IE5 and IE5.5 require further treatment.
 +
 
 +
text-align:center
 +
 
 +
Added to the body element to force IE to centre all content
 +
 
 +
body * {text-align:left}
 +
 
 +
Resets all text aligns to the left
 +
 
 +
#wrapper {width:760px}
 +
 
 +
States the wrapper width. All centred content goes inside a div with an id="wrapper.
 +
 
 +
* {
 +
  margin:0;
 +
  padding:0}
 +
html {
 +
  height:100%;
 +
  font-size:100.01%
 +
}
 +
body {
 +
  text-align:center;
 +
  min-height:101%;
 +
  font:100.01%/130% Verdana, Helvetica, sans-serif;
 +
  color:#000; background:#fff;
 +
  width:760px;
 +
  margin:0 auto
 +
}
 +
body * {text-align:left;}
 +
#wrapper {width:760px}

Aktuelle Version vom 23. Oktober 2020, 07:37 Uhr

Browser Hacks[Bearbeiten]

IE10, IE11 und Edge[Bearbeiten]

@media all and (-ms-high-contrast:none) {
     .beispiel { color: green } /* IE10 & IE11 */
     *::-ms-backdrop, .beispiel { color: red } /* IE11 */
}

@supports (-ms-ime-align:auto) {
   .beispiel { color: blue; } /* EDGE (nur alte EDGE) funktioniert 2020 nicht mehr*/
}

IE Hacks und IE Switches[Bearbeiten]

Wie man dem Internet Explorer (und EdgeSonderregeln beibringt.

Internet Explorer Conditions[Bearbeiten]

Generell ist die offizielle von MS empfohlene Methode eine Condition der Form:

 <!--[if IE]>
 <link rel="stylesheet" type="text/css" href="iehacks.css" />
 <![endif]-->

 <!--[if IE 5]>
 <link rel="stylesheet" type="text/css" href="iehacks-5.css" />
 <![endif]-->

 <!--[if lt IE 8]>
 <link rel="stylesheet" type="text/css" href="iehacks.css" />
 <![endif]-->

lt bedeutet less than. Die Regeln betreffen also aller Versionen unter IE 8 (die es im Moment noch nicht gibt;-) Außerdem gibts noch lte (lower than and equal) und gte (greater than and equal) important Hack

Unter Umständen kann auch die important- Klausel weiterhelfen, die der IE nicht kennt, wohl aber FF/ Opera/ Konqueror; zudem macht man sich dabei keines neuen Bugs zu Hilfe.

Wichtig: Immer erst die important- Klausel!

Die Klausel bewirkt bei entsprechend kompatiblen Browsern, dass diese Eigenschaft nachfolgend nicht mehr überschrieben werden kann.

Beispiel:

1. box { 
    min-height: 300px; 
    height: auto !important; 
    height: 300px; 
    ... 
}

Star-Plus-HTML-Hack (IE7)[Bearbeiten]

Quelle: http://www.css-hack.de/Internet+Explorer/IE+7 (Zugriff: 08/2012)

Dem Universal-Selektor * wird ein Plus-Zeichen hinzugefügt. Diese Schreibweise wird lediglich vom IE 7 interpretiert!

* + html div {
   width : 20em;
}

Sternchen Hack (IE5,IE6)[Bearbeiten]

Anwendung: Anweisungen nur für IE 5 und 6 z.B.

* html {...} /*das sehen nur IEs*/

Zukunftssicher: funktioniert nicht mehr bei IE 7

Box Model Hack / Tantek Hack[Bearbeiten]

IE 5 und IE 5.5

Anwendung: Box Model Fehler von IE 5/5.5 korrigieren

Beispiel:

#kasten{
    width: 360px;
}

* html #kasten{       /*Das beachten nur IEs*/
    width: 400px;       /* der 'Falsche' Wert für alte IEs */
    w\idth: 360px;      /* das sieht nur der IE 6 */
}

Zukunftssicher: ja

Kind Selektor Hack[Bearbeiten]

IE versteht den KindSelektor nicht. Z.B.

body > p 

Anwendung: Höhe nur für IE setzen (IE braucht Höhenangaben z.B. wg. Inline Padding Bug.)

Beispiel:

#inhalt {height: 100px;}  /*für IE*/
html>body #inhalt {       /*für andere Browser zurücksetzen*/
   height: auto
}

Browser Bugs[Bearbeiten]

IE:mac CSS overflow-Bug

Der Internet Explorer für Mac stürzt ab, wenn man overflow: auto auf ein Input-Element des Typs Submit anwendet und auf die Schaltfläche klickt.

Lösung/Fix: Statt overflow: auto muss overflow: visible zugewiesen werden.

Weitere Info: http://www.bernd-lutz.de/css_overflow-bug_ie_mac-51.php Box Model Bug

IE 5 / 5.5

Standard: Elementbreite = width + paddings + margins + borders IE: Elementbreite = width + margin

Wenn also eine width und borders bzw. paddings angegeben sind werden die Boxen im IE 5 und 5.5 zu klein weil die paddings und borders nicht dazu gezählt werden. Lösung:

  1. Wenn width angegeben kein padding oder border verwenden. Stattdessen Ränder auf die Kindelemente anwenden.
  2. Box Model Hack / Kind Hack 

Kommentar Hack[Bearbeiten]

Anwendung: vor IE/Mac verstecken z.B. bei 3px Bug der nur in Win Versionen auftaucht.

Beispiel (in Kombination mit * Hack)

/* Hide from IE5-mac. Only IE-win sees this. \*/

  • html #floatbox {

margin-right: 10px; }

  • html p {

height: 1%; margin-left: 0; } /* End hide from IE5/mac */

Inline Padding Bug[Bearbeiten]

Horizontales Padding und Margin funktioniert bei Inline-Elementen im IE nur wenn eine Höhe angegeben ist. Dann kann es allerdings zu anderen Seiteneffekten kommen.

Lösung Höhe mit Kind Selektor Hack setzen. 3px Bug bei Bildern

Oft taucht beim IE im Zusammenhang mit floatenden Elementen eine Lücke unterhalb oder links rechts eines Bildes auf. Selbst eine Höhe für das Div hilft nichts.

Lösungsansätze: negatives padding für (Win IEs) overflow: hidden; Double Margin Bug

IE6 und kleiner berechnen den Margin einer floatenden Box manchmal doppelt.

This bug only occurs when the float margin goes in the same direction as the float and is trapped directly between the float and the inside edge of the container box. Any following floats with a similar margin won't show the doubled margin. Only the first float in any given float row will suffer from the bug. Also, the doubled margin displays symmetry, working the same way to the right as it does to the left. (Position Is Everything)

Lösung: Die floatende box bekommt den Wert:

display: inline;

Der Bug ist damit behoben und die Box bleibt (nach W3C Definition trotzdem ein Block Element, weil floatende Boxen automatisch immer Block-Elemente werden.

IE7 Update[Bearbeiten]

Aus: IE-Blog http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx Korrigierte Bugs Bugs we fixed

   * All bugs on positioniseverything.net except the “escaping floats” bug (which is planned for the future)
         o Peekaboo Bug
         o Internet Explorer and Expanding Box Problem
         o Quirky Percentages
         o Line-height bug
         o Border Chaos
         o Disappearing List-Background bug
         o Guillotine Bug
         o Unscrollable Content bug
         o Duplicate Characters Bug
         o IE and Italics
         o Doubled Float-Margin bug
         o Duplicate Indent bug
         o Three pixel text jog
         o Creeping Text bug
         o Missing First letter bug
         o Phantom box bug 

Details on some of the other bugs (from sources other than the positioniseverything.net list) that we fixed:

   * Overflow now works correctly! (That means boxes do not automatically grow any more.)
   * Parser bugs: * html, _property and /**/ comment bug
   * Select control: CSS style-able and not always on top
   * Auto-sizing of absolute positioned element with width:auto and right & left (great for 3 column layouts)
   * Addressed many relative positioning issues
   * Addressed many absolute positioned issues
   * % calculations for height/width for abs positioned elements http://channel9.msdn.com/ShowPost.aspx?PostID=191182
   * <?xml> prolog no longer causes quirks mode
   * HTML element truly independent of the Body (now gets its own width, height etc.)
   * 1 px dotted borders no longer render as dashed
   * Bottom margin bug on hover does not collapse margins
   * Several negative margin issues fixed
   * Recalc issues including relative positioning and/or negative margins are fixed now
   * CLSID attribute of <object> tag no longer limited to 128 characters
   *  :first-letter whitespace bug described in http://blogs.msdn.com/ie/archive/2005/09/02/460115.aspx fixed
   * Descendant selector now works properly for grand children when combined with other selectors
   * First-line and first-letter now applies when there is no space between word :first-line and opening brace {
   * Pseudo-classes now are working as expected if selector is excluded
   * The :link selector works now for anchor tag with href set to bookmark
   * Addressed !important issues
   * PositionIsEverything piefecta-rigid.htm now works
   * List-item whitespace bug fixed
   * Fixed Absolutely Buggy II
   * Absolute positioned elements now use always correct containing block for positioning and size information
   * Nested block elements now respect all overflow declarations (hidden, scroll, etc)
   * Fixed the opposing offset problem (absolute positioned element whit all four top, bottom left and right are present)
   * <a> tags nested within LI elements will no longer add extra bottom margin when hover occurs
   * We no longer lose the image aspect ratio on refresh
   * Cleaned up our ident parsing according to CSS2.1 rules
   * Fixed parsing bugs for multi- class selectors and class selectors that are combined with id selectors
   * And many more 

We also extended our existing implementations to comply with W3C specifications:

   * Enable :hover on all elements not just on <a>
   * Background-attachment: fixed works on all elements – so Eric Meyer’s complexspiral demo works
   * Improved <object> fallback 

Finally, we added new features from CSS2.1:

   * Min/max width/height support (also for images, which did not work in IE7b2)
   * Transparent borders
   * Fixed positioning support
   * Selectors: first-child, adjacent, attribute, child
         o A couple of CSS 3 attribute selectors: prefix, suffix and substring since we were working already in the code base (also the general sibling selector) 
   * Alpha channel PNG support (Not a CSS feature but too important for designers to not call it out J) 

Links

http://css.nu/pointers/bugs-ie.html 2006-06-29

http://websemantics.co.uk/tutorials/useful_css_snippets/ Useful Snippets

aus http://websemantics.co.uk/tutorials/useful_css_snippets/ Leveller

Versuche alle Browser auf möglichts gleiche Werte 'vorzukonfigurieren'


  • {margin:0; padding:0}

Removes margin and padding from every element.

html {height:100%}

Sets the window height.

min-height:101%;

Sets the minimum page height to greater than the window height to force Netscape & Firefox to display vertical scrollbars, thereby preventing content jumping on fixed width pages. IE doesn't understand min-height and totally ignores this setting.

font:100.01%/130% Verdana, Helvetica, sans-serif;

Set font-size to a percentage preventing a Windows IE "extreme font re-sizing" bug. Set font-size slightly larger than 100% to repair Opera rounding errors. Set less than 101% to prevent Safari errors. The line-height setting gives nice, clear and easy-read spacing. Verdana is the most readable, and readily available screen font in Windows. Helvetica most readable, and readily available screen font on Macintosh computers. Sans-serif is the most readable to the widest audience for body text.

color:#000; background:#fff;

Set general colour & background.

width:760px;

Fixed width set for 800 pixel wide browser displays.

margin:0 auto

Margins are set for centring the content. This works for IE6, Firefox, Opera, Safari and Netscape but IE5 and IE5.5 require further treatment.

text-align:center

Added to the body element to force IE to centre all content

body * {text-align:left}

Resets all text aligns to the left

  1. wrapper {width:760px}

States the wrapper width. All centred content goes inside a div with an id="wrapper.

  • {
 margin:0;
 padding:0} 

html {

 height:100%; 
 font-size:100.01%

} body {

 text-align:center;
 min-height:101%;
 font:100.01%/130% Verdana, Helvetica, sans-serif;
 color:#000; background:#fff;
 width:760px;
 margin:0 auto 

} body * {text-align:left;}

  1. wrapper {width:760px}