<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Norman&#039;s Blog &#187; IE6</title>
	<atom:link href="http://www.normansblog.de/tag/ie6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.normansblog.de</link>
	<description>News über CSS, jQuery, Firefox und andere Browser sowie aktuelle Kinofilme.</description>
	<lastBuildDate>Fri, 21 Sep 2018 13:18:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>IE6 &amp; IE7 Button Bug</title>
		<link>http://www.normansblog.de/ie6-ie7-button-bug/</link>
		<comments>http://www.normansblog.de/ie6-ie7-button-bug/#comments</comments>
		<pubDate>Tue, 17 May 2011 19:42:34 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Nerviges]]></category>

		<guid isPermaLink="false">http://www.normansblog.de/?p=3464</guid>
		<description><![CDATA[Manchmal ist die Lösung so banal.. Dass der IE6 manchmal ein übler Troll sein kann und sein Nachfolger IE7 ihm in dieser Hinsicht in nichts nachsteht, brauch ich euch ja wohl kaum erzählen (ich habs jetzt natürlich trotzdem gemacht, einfach um ein cooles Intro zu haben ). Jedenfalls bin ich neulich erst auf einen richtig [...]]]></description>
			<content:encoded><![CDATA[<p>Manchmal ist die Lösung so banal..</p>
<div id="attachment_3465" class="wp-caption alignright" style="width: 170px"><a href="http://www.normansblog.de/ie6-ie7-button-bug/"><img src="http://www.normansblog.de/wp-content/uploads/2011/05/IE-6-troll-internet-explorer-browser-trollface-150x143.png" alt="IE6 Troll" title="IE6 Troll" width="150" height="143" class="size-thumbnail wp-image-3465" /></a><p class="wp-caption-text">Problem?</p></div>
<p>Dass der <a href="http://www.normansblog.de/position-absolute-png-filter/">IE6 manchmal ein übler Troll</a> sein kann und sein Nachfolger IE7 ihm in dieser Hinsicht in nichts nachsteht, brauch ich euch ja wohl kaum erzählen (ich habs jetzt natürlich trotzdem gemacht, einfach um ein cooles Intro zu haben <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). Jedenfalls bin ich neulich erst auf einen richtig schönen Fix für ein bekanntes Problem bezüglich der Darstellung von Buttons im IE gestoßen.</p>
<p>Kennt ihr das: Ihr habt einen Button oder ein Submit-Input und gebt dem etwas Padding und schon zerschießt es euch im IE das halbe Formular, weil dieser Browser denkt, er müsse den Dicken markieren, indem er den Padding-Wert verdoppelt?</p>
<p><span id="more-3464"></span></p>
<p>Na dann seit ihr hier goldrichtig!</p>
<h3>Das Problem</h3>
<p>Wir haben also einen <code>button</code> oder ein <code>input</code> mit dem <code>type="submit"</code> (der Bug betrifft beides gleichermaßen) auf unserer Seite, was der tut ist uns an dieser Stelle reichlich egal.</p>
<h6>HTML</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span>&gt;</span>Button<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span></pre></td></tr></table></div>

<p>Normalerweise rate ich immer dazu die Buttons so zu lassen, wie sie sind und so wenig wie möglich am Styling zu ändern. Natürlich kommt es jedoch vor, dass sie dadurch nicht richtig ins &#8220;Corporate Design&#8221; einer Firma &#8220;fitten&#8221;. Und da Kunde==König immer wahr ist, muss man hier und da etwas nachhelfen, dass die Buttons auch zum Rest passen. Sehr häufig muss dazu beispielsweise links und rechts das Padding erhöht werden, damit das alles nicht so zusammengeklatscht aussieht.</p>
<h6>CSS</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">button <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Alles gut denkt man, aber beim X-Browser-Test macht man schnell große Augen: Im IE6 und IE7 sind es nicht nur 10 Pixel links und rechts sondern mindestens doppelt so viele. Hier ein Vergleich:</p>
<p class="acenter"><img src="http://www.normansblog.de/wp-content/uploads/2011/05/ie_button_bug.jpg" alt="" title="Button-Bug in IE6 und IE7" width="408" height="99" class="aligncenter size-full wp-image-3470" /><small>Die türkisen Linien sind nachträglich eingezeichnet worden..</small></p>
<h3>Die Lösung</h3>
<p>In solchen Momenten möchte man am liebsten in die Tastatur beißen oder die Maus durch die Gegend werfen (@Wireless-Maus-User: tut es nicht!). Aber das ist gar nicht nötig, denn die Lösung ist ganz einfach, nahezu trivial. <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Alles, was wir tun müssen, ist eine Zeile CSS mehr zu schreiben:</p>
<h6>CSS</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">button <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Durch <code>overflow:visible</code> hört der IE auf, mehr Padding zu vergeben als eigentlich gewollt. Das Schöne daran ist, dass er 100% valide ist und keinerlei Nachteile hat. Der Tag ist damit gerettet und alle können quietschvergnügt nach Hause gehen!</p>
<p class="acenter"> <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Frontend-Developer <strong>1:0</strong> Internet Explorer <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.normansblog.de/ie6-ie7-button-bug/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Türchen #9: display:inline-block</title>
		<link>http://www.normansblog.de/tuerchen-9-display-inline-block/</link>
		<comments>http://www.normansblog.de/tuerchen-9-display-inline-block/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 13:55:06 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Adventskalender 2010]]></category>
		<category><![CDATA[Anfänger]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://www.normansblog.de/?p=3015</guid>
		<description><![CDATA[Nachholbedarf ist angesagt.. Am neunten Tag möchte ich euch display:inline-block näher bringen. display an sich dürfte ja allen bekannt sein.. es gibt (neben diversen anderen) display:none, display:block, display:inline und eben noch etwas dazwischen &#8211; inline-block. Wozu man das braucht und wobei es hilfreich sein kann, verrät euch der heutige Eintrag. Browserunterstützung Browser ab Version 3.0 [...]]]></description>
			<content:encoded><![CDATA[<p>Nachholbedarf ist angesagt..</p>
<p><a href="http://www.normansblog.de/tuerchen-9-display-inline-block/"><img src="http://www.normansblog.de/wp-content/uploads/2010/11/adventskalender_9.png" alt="Türchen #9" title="Türchen #9" width="151" height="139" class="alignright size-full wp-image-2862" /></a> Am neunten Tag möchte ich euch display:inline-block näher bringen. display an sich dürfte ja allen bekannt sein.. es gibt (neben <a href="https://developer.mozilla.org/en/CSS/display#Values">diversen anderen</a>) <em>display:none</em>, <em>display:block</em>, <em>display:inline</em> und eben noch etwas dazwischen &#8211; <em>inline-block</em>. Wozu man das braucht und wobei es hilfreich sein kann, verrät euch der heutige Eintrag.</p>
<p><span id="more-3015"></span></p>
<h3>Browserunterstützung</h3>
<table class="acenter alignright">
<tr>
<td>Browser</td>
<td><img src="http://www.normansblog.de/wp-content/uploads/2010/11/firefox_ico.png" alt="Firefox" title="Firefox" width="16" height="16" class="alignnone size-full wp-image-2887" /></td>
<td><img src="http://www.normansblog.de/wp-content/uploads/2010/11/safari_ico.png" alt="Safari" title="Safari" width="16" height="16" class="alignnone size-full wp-image-2890" /></td>
<td><img src="http://www.normansblog.de/wp-content/uploads/2010/11/opera_ico.png" alt="Opera" title="Opera" width="16" height="16" class="alignnone size-full wp-image-2889" /></td>
<td><img src="http://www.normansblog.de/wp-content/uploads/2010/11/chrome_ico.png" alt="Chrome" title="Chrome" width="16" height="16" class="alignnone size-full wp-image-2886" /></td>
<td><img src="http://www.normansblog.de/wp-content/uploads/2010/11/ie_ico.png" alt="Internet Explorer" title="Internet Explorer" width="16" height="16" class="alignnone size-full wp-image-2888" /></td>
</tr>
<tr>
<td>ab Version</td>
<td>3.0</td>
<td>1.0</td>
<td>3.5</td>
<td>1.0</td>
<td>5.5</td>
</tr>
</table>
<p><code>inline-block</code> hat eine Weile gebraucht bis es sich flächendeckend bei allen Browsern durchgesetzt hat. Aktuelle Versionen unterstützen es problemlos, nur IE6 und 7 haben eine Einschränkung: Der Wert wird nur auf inline-Elemente korrekt angewendet.</p>
<p>Was ist nun der große Vorteil von Inline-Block-Elementen? Anders als Block-Elemente, welche standardmäßig auf die volle Breite des Elternelements aufgezogen, verhalten sich Inline-Block-Elemente wie Replaced Elements (das <code>img</code>-Tag wäre ein Beispiel dafür). D. h. dass sie in den Textfluss eingebunden bleiben aber dennoch dir Vorteile eines Block-Elements genießen. Dazu zählen unter anderem volle Unterstützung für Margin. Auf normale Inline-Elemente kann man beispielsweise kein Margin anwenden, das hat schlicht keinen Einfluss.</p>
<h3>Beispiel</h3>
<p>Oftmals wird inline-block eingesetzt, wenn man ein Grid &#8211; auf Deutsch &#8220;Gitter-Struktur&#8221; &#8211; aufbauen will, deren Zellen aufgrund ihres Inhalts eine unbekannte Höhe haben können. Nehmen wir an, wie hätten eine Liste mit sechs Elementen, diese wollen wir zu einem 3&times;2-Grid zusammenfügen.</p>
<h6>HTML</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>2<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>+<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>5<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>6<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></td></tr></table></div>

<p>Zunächst wollen wir das auf althergebrachte Art und Weise machen, mit <code>float</code>:</p>
<h6>CSS</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">180px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#adf</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h6>Ergebnis</h6>
<ul style="border:1px solid #aaa;color:#fff;font-size:30px;list-style:none;margin:0 0 10px;overflow:hidden;padding:0 10px 10px 0;text-align:center;width:180px;">
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">1</li>
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">2<br/>+</li>
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">3</li>
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">4</li>
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">5</li>
<li style="background:#adf;float:left;margin:10px 0 0 10px;padding:10px;width:30px;">6</li>
</ul>
<p>Und da sehen wir auch schon das Problem dieser Lösung: Sobald ein Listenelement höher ist als die anderen, bringt es komplett die Reihenfolge durcheinander. Außerdem muss die Liste <em>gecleared</em> werden, da die Listenelemente <em>floaten</em>. Genau da hilft uns <code>inline-block</code> weiter, aber auch damit muss man zwei Dinge beachten.</p>
<ol>
<li>Dadurch, dass die Elemente nun Inline-Charakter haben, werden Zeilenumbrüche, Einrückungen und Leerzeichen im Code als zu einem Leerzeichen zusammengefasst. Um dem entgegen zu wirken, brauch man nur die <code>li</code>-Tags hintereinander zu schreiben.</li>
<li>Ein weiterer Nachteil des Inline-Charakters ist die Tatsache, dass jetzt das Vertical-Alignment greift. Wir müssen also <code>vertical-align:top</code> setzen, damit die Listenelemente nach oben hin bündig zueinander sind.</li>
</ol>
<h6>HTML</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>2<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">br</span><span style="color: #66cc66;">/</span>&gt;</span>+<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>5<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>6<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></td></tr></table></div>

<h6>CSS</h6>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #808080; font-style: italic;">/*overflow:hidden;*/</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">180px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#adf</span><span style="color: #00AA00;">;</span>
	<span style="color: #808080; font-style: italic;">/*float:left;*/</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h6>Ergebnis</h6>
<ul style="border:1px solid #aaa;color:#fff;font-size:30px;list-style:none;margin:0 0 10px;padding:0 10px 10px 0;width:181px;letter-spacing:-7px;">
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">1</li>
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">2<br/>+</li>
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">3</li>
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">4</li>
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">5</li>
<li style="background:#adf;display:inline-block;margin:10px 0 0 10px;padding:10px;text-align:center;width:30px;vertical-align:top;">6</li>
</ul>
<p>Somit hätten wir ein schönes Grid, das so umbricht, wie man es von einem Grid erwartet. To be continued..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.normansblog.de/tuerchen-9-display-inline-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Position:Absolute &amp; PNG Filter</title>
		<link>http://www.normansblog.de/position-absolute-png-filter/</link>
		<comments>http://www.normansblog.de/position-absolute-png-filter/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 12:41:10 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://www.normansblog.de/?p=1097</guid>
		<description><![CDATA[Wenn mal wieder irgendwas im IE6 nicht geht.. dann sucht man meistens den Fehler bei sich selbst &#8211; ist mein XHTML invalide, hab ich Fehler im CSS? Meistens. Manchmal hat man es aber auch mit einem strunzdummen Browser zu tun. So zum Beispiel diese Woche, als auf Arbeit ein kleines Problem auftrat. Hier mal eine [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn mal wieder irgendwas im IE6 nicht geht..</p>
<div id="attachment_1104" class="wp-caption alignright" style="width: 178px"><a href="http://www.normansblog.de/position-absolute-png-filter/"><img src="http://www.normansblog.de/wp-content/uploads/2009/09/position_absolute_png_filter_thumb.jpg" alt="Kann IE6 das?" title="position_absolute_png_filter_thumb" width="158" height="157" class="size-full wp-image-1104" /></a><p class="wp-caption-text">Kann IE6 das?</p></div>
<p>dann sucht man meistens den Fehler bei sich selbst &#8211; ist mein XHTML invalide, hab ich Fehler im CSS? Meistens. Manchmal hat man es aber auch mit einem strunzdummen Browser zu tun. So zum Beispiel diese Woche, als auf Arbeit ein kleines Problem auftrat. Hier mal eine Beschreibung der Situation: gefordert war ein Newsticker, der seine Einträge automatisch durchscrollen lässt. Bei den Einträgen handelte es sich um große Hintergrundbilder mit einer darübergelegten halbtransparenten Textbox, in der wiederum ein Link stehen sollte (zur Weiterleitung auf den eigentlichen Newseintrag).</p>
<p><span id="more-1097"></span></p>
<p>Zum besseren Verständnis mal ein Bild:</p>
<div id="attachment_1107" class="wp-caption aligncenter" style="width: 520px"><a href="http://www.normansblog.de/wp-content/uploads/2009/09/position_absolute_png_filter.jpg"><img src="http://www.normansblog.de/wp-content/uploads/2009/09/position_absolute_png_filter.jpg" alt="Newseinträge mit Hintergrundbild und halbtransparenter Box." title="position_absolute_png_filter" width="500" height="250" class="size-full wp-image-1107" /></a><p class="wp-caption-text">Newseinträge mit Hintergrundbild und halbtransparenter Box.</p></div>
<p>Das Sliden/Scrollen der Einträge war kein Problem, das erledigte ein Javascript. Das große Bild wurde per <code>img</code>-Tag im Newseintrag angegeben, genau wie der Inhalt der Textbox samt Link. Die Textbox hatte als Hintergrundbild die halbtransparente weiße Box und wurde mit <code>position:absolute</code> an die entsprechende Stelle geschoben. Alles funktionierte wunderbar, natürlich fehlten jetzt noch die Anpassungen für den IE6.</p>
<p>Da IE6 keine halbtransparenten PNGs unterstützt, nutzen wir die proprietäre <a href="http://jeenaparadies.net/weblog/2007/jun/png-alphatransparenz-im-ie-nutzen">Filtermethode von Microsoft</a>. Dabei wird das Hintergrundbild entfernt und das neugefilterte Bild eingefügt. Der Code sieht folgendermaßen aus:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.trans_box</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    filter<span style="color: #3333ff;">:progid</span><span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.AlphaImageLoader<span style="color: #00AA00;">&#40;</span>enabled<span style="color: #00AA00;">=</span>true<span style="color: #00AA00;">,</span> sizingMethod<span style="color: #00AA00;">=</span><span style="color: #993333;">crop</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'trans_box.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Das ganze sollte man über eine extra IE6 CSS-Datei per <a href="http://en.wikipedia.org/wiki/Conditional_comment">Conditional Comment</a> einfügen, weil sonst das CSS invalide wird.</p>
<p>Gesagt, getan doch plötzlich das böse Erwachen (im IE6): den Link in der Textbox konnte man zwar noch markieren aber nicht mehr anklicken.</p>
<p>Und ich nur so: &#8220;WTF?!&#8221;.</p>
<p>Tja.. die Filtermethode hat leider einige Nachteile, wie ich wenig später herausgefunden habe. Was mir schon bekannt war, war dass <code>background-position</code> Anweisungen nicht mehr funktionieren würden ABER außerdem noch folgendes (jetzt kommts):</p>
<blockquote><p>Links, die sich innerhalb eines absolut-positionierten Elementes befinden, das ein halbtransparentes Hintergrundbild durch die Filtermethode zugewiesen bekommt, sind nicht klickbar.</p></blockquote>
<p>Jap, so hab ich auch geguckt. Was also tun? Nach ein paar Minuten Googeln die Lösung: Damit die Links wieder funktionieren, muss man zusätzliches Markup einfügen.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;trans_box&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;innerwrap&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Link<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Damit können wir jetzt die Änderungen am CSS durchführen.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.trans_box</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.innerwrap</span> <span style="color: #00AA00;">&#123;</span>
    filter<span style="color: #3333ff;">:progid</span><span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.AlphaImageLoader<span style="color: #00AA00;">&#40;</span>enabled<span style="color: #00AA00;">=</span>true<span style="color: #00AA00;">,</span> sizingMethod<span style="color: #00AA00;">=</span><span style="color: #993333;">crop</span> src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'trans_box.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    zoom<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.trans_box</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Der Filter wird von der äußeren Box rein in den innerwrap gezogen und bekommt <code>zoom:1;</code>, damit <a href="http://onhavinglayout.fwpf-webdesign.de/">hasLayout</a> im IE6 gesetzt ist. Die Änderungen am Link sind dazu da, dass dieser stets über den anderen Boxen dargestellt wird.</p>
<p>Ist alles bisschen dreckig aber es funktioniert. Das Extra-Markup ist denke ich verkraftbar, wenn man dafür eine schöne transparente Box im IE6 haben kann.<br />
Viel Spaß damit. <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><small>Mehr zum Thema auf Englisch bei <a href="http://www.satzansatz.de/cssd/tmp/alphatransparency.html">satzansatz.de</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.normansblog.de/position-absolute-png-filter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Goodbye IE6 (burn in hell!)</title>
		<link>http://www.normansblog.de/goodbye-ie6/</link>
		<comments>http://www.normansblog.de/goodbye-ie6/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 00:48:18 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://www.normansblog.de/?p=619</guid>
		<description><![CDATA[Heute ist ein wichtiger Tag. Warum fragt ihr? Ganz einfach. Da heut sonst nichts weiter passiert ist, hab ich allen Mut zusammengenommen und beschlossen, dass ich ab sofort den IE6 nicht mehr unterstützten werde. Für meinen Blog heißt das also: keine Anpassungen, keine Tests, keine dummen Hacks. Ich hab&#8217;s einfach satt! Der IE6 landet in [...]]]></description>
			<content:encoded><![CDATA[<p>Heute ist ein wichtiger Tag.</p>
<div id="attachment_620" class="wp-caption alignright" style="width: 147px"><a href="http://www.normansblog.de/goodbye-ie6/"><img src="http://www.normansblog.de/wp-content/uploads/2009/04/ie6_trash.jpg" alt="Go to hell!" title="ie6_trash" width="127" height="200" class="size-full wp-image-620" /></a><p class="wp-caption-text">Go to hell!</p></div>
<p>Warum fragt ihr? Ganz einfach. Da heut sonst nichts weiter passiert ist, hab ich allen Mut zusammengenommen und beschlossen, dass ich ab sofort den <strong>IE6 nicht mehr unterstützten</strong> werde. Für meinen Blog heißt das also: keine Anpassungen, keine Tests, keine dummen Hacks.</p>
<h3>Ich hab&#8217;s einfach satt! <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_mad.gif' alt=':-x' class='wp-smiley' /> </h3>
<p>Der IE6 landet in der Tonne. Alle, die das Drecksding von 2001 noch benutzen, sind selber schuld und bekommen jetzt eine Seite mit leicht zerschossenem Layout zu Gesicht. Die Meldung, doch bitte einen anderen Browser zu benutzen, bleibt bestehen und sollte von allen IE6 Nutzern ernst genommen werden.</p>
<p><span id="more-619"></span></p>
<p>Viel zulange haben wir Entwickler dafür gesorgt, dass unsere Seiten auch im IE6 gut dargestellt werden. Jetzt ist Schluss damit! &#8220;Adopt or die&#8221; heißt die Devise also spart euch Rumgeheule in den Kommentaren.</p>
<p>Nochmal zu den Alternativen, die alle schneller, sicherer und generell besser sind als der IE6!</p>
<ol>
<li><a href="http://www.mozilla.com/firefox/">Firefox</a></li>
<li><a href="http://www.opera.com/">Opera</a></li>
<li><a href="http://www.apple.com/safari/">Safari</a></li>
<li><a href="http://www.microsoft.com/ie8">Internet Explorer 8</a></li>
<li><a href="http://www.google.com/chrome/">Chrome</a></li>
</ol>
<p>Schöne Woche noch <img src='http://www.normansblog.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.normansblog.de/goodbye-ie6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
