<?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>CSSGURU.DE &#187; CSS</title>
	<atom:link href="http://www.cssguru.de/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cssguru.de</link>
	<description>Ein weiteres tolles WordPress-Blog</description>
	<lastBuildDate>Tue, 24 Aug 2010 19:28:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS clearfix</title>
		<link>http://www.cssguru.de/css-clearfix/</link>
		<comments>http://www.cssguru.de/css-clearfix/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 16:25:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[clearfix]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=291</guid>
		<description><![CDATA[Das Problem mit &#8220;float-Elementen&#8221; innerhalb eines Container ist, dass diese manchmal &#8220;ausbrechen&#8221;. Der Grund dafür ist, dass der Float, den Fluss unterbricht und somit das überstehende Element nicht weis wie hoch es sein soll. Da man es eigentlich schlecht erklären kann &#8211; hier ein Beispiel was gemeint ist:


Box 1
Box 2


In diesem Beispiel sieht man ganz [...]]]></description>
			<content:encoded><![CDATA[<p>Das Problem mit &#8220;float-Elementen&#8221; innerhalb eines Container ist, dass diese manchmal &#8220;ausbrechen&#8221;. Der Grund dafür ist, dass der Float, den Fluss unterbricht und somit das überstehende Element nicht weis wie hoch es sein soll. Da man es eigentlich schlecht erklären kann &#8211; hier ein Beispiel was gemeint ist:<br />
<span id="more-291"></span></p>
<div class="test_clearfix_box">
<p>Box 1</p>
<div class="float_left_box">Box 2</div>
</div>
<div class="Clear segmenter"></div>
<p>In diesem Beispiel sieht man ganz gut, dass die Box 2 aus der Box 1 ausbricht, obwohl sich diese innerhalb befindet.<br />
Um dieses zu unterbinden kann man entweder ein &#8220;clear: both&#8221; hinter dem float-element hinzufügen, oder auch den sogenannten &#8220;clearfix&#8221; benutzen. Das CSS dafür sieh so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>  <span style="color: #808080; font-style: italic;">/* für Firefox, IE8, Opera, Safari, etc. */</span>
    <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span>;  
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span>;
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> 0;
    <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span>;
    <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #00AA00;">*</span> <span style="color: #00AA00;">+</span> html <span style="color: #6666ff;">.clearfix</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* für IE7 */</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #00AA00;">*</span> html <span style="color: #6666ff;">.clearfix</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #808080; font-style: italic;">/* für IE6 */</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">1</span>%</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Und hier das HTML mit der &#8220;clearfix&#8221; Klasse:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict 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;test_clearfix_box clearfix&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Box 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</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;float_left_box&quot;</span>&gt;</span>Box 2<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></div></div>

<p>Und hier das Ergebniss wie es eignlich aussehen sollte:</p>
<div class="test_clearfix_box clearfix">
<p>Box 1</p>
<div class="float_left_box">Box 2</div>
</div>
<div class="segmenter"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css-clearfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Box und Text-Shadow</title>
		<link>http://www.cssguru.de/css3-box-und-text-shadow/</link>
		<comments>http://www.cssguru.de/css3-box-und-text-shadow/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:33:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[shatten mit css]]></category>
		<category><![CDATA[text-shadow]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=276</guid>
		<description><![CDATA[Firefox und Safari bieten die Möglichkeit an per CSS Schatten-Effekte beim Text oder auch beim Box-Model zu zaubern.
Beim Text-Shadow sieht es so aus:

text-shadow: 2px 2px 2px #000;


Die ersten 2px sind für den Schatten rechts und die nächsten 2px für den Schatten unten.
Danach folgt noch der Abstand in PX und die Farbe des Schatens:
Ich bin ein [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox und Safari bieten die Möglichkeit an per CSS Schatten-Effekte beim Text oder auch beim Box-Model zu zaubern.<br />
Beim Text-Shadow sieht es so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #cc00cc;">#000</span>;</pre></div></div>

<p><span id="more-276"></span><br />
Die ersten 2px sind für den Schatten rechts und die nächsten 2px für den Schatten unten.<br />
Danach folgt noch der Abstand in PX und die Farbe des Schatens:</p>
<p><span class="text-shadow">Ich bin ein Text mit Schatten</span></p>
<p>Beim dem Box-Shadow Effekt siehts ähnlich aus. Man braucht auch hier 3 angeben (Schatten rechts, Schaten unten und der Blur-Effekt)</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#999</span>; <span style="color: #808080; font-style: italic;">/* Firefox hack */</span>
-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#999</span>; <span style="color: #808080; font-style: italic;">/* Safari and Chrome hack */</span>
box-shadow<span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#999</span>;</pre></div></div>

<p>Bei dem Beispiel unten habe ich noch ein padding von 10px für den inneren Abstannd hinzugefügt.</p>
<div class="box-shadow">Ich bin eine Box mit Schatten</div>
<p>Leider werden diese Eigenschaften (wie immer) von den Internet Explorer nicht ünterstützt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css3-box-und-text-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 Layout</title>
		<link>http://www.cssguru.de/html-5-layout/</link>
		<comments>http://www.cssguru.de/html-5-layout/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 11:32:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=169</guid>
		<description><![CDATA[Die Arbeit am HTML 5 ist zwar noch nicht abgeschlossen, da es aber von dem W3C-Konsortium vorgestellt und schon von den modernen Browsern unterstützt wird, werde ich in diesem Artikel zeigen wie man ein Seitenlayout mit HTML 5 erstellt.

Als Vorlage werde ich ein einfaches Design wie dieses hier verwenden:

Das HTML 5 Grundgerüst sieht dann wie [...]]]></description>
			<content:encoded><![CDATA[<p>Die Arbeit am HTML 5 ist zwar noch nicht abgeschlossen, da es aber von dem W3C-Konsortium vorgestellt und schon von den modernen Browsern unterstützt wird, werde ich in diesem Artikel zeigen wie man ein Seitenlayout mit HTML 5 erstellt.<br />
<span id="more-169"></span><br />
Als Vorlage werde ich ein einfaches Design wie dieses hier verwenden:</p>
<p><img src="http://www.cssguru.de/wp-content/uploads/html5design.png" alt="html5design" title="html5design" width="480" height="255" class="alignnone size-full wp-image-170" /></p>
<p>Das HTML 5 Grundgerüst sieht dann wie folgt aus:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;de&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>HTML5 Layout<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/main.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</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;">head</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
  ...
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Bis auf den Doctype sieht die Synthax eigentlich nicht viel anders aus als bei einem XHTML/HTML 4 Document.<br />
Um mit der Umsetzung des Layouts weiter zu machen, habe ich noch eine kleine Grafik erstellt, um die Synthax von HTML 5 besser darzustellen:</p>
<p><img src="http://www.cssguru.de/wp-content/uploads/html5struktur.png" alt="html5struktur" title="html5struktur" width="480" height="226" class="alignnone size-full wp-image-175" /></p>
<p>Jetzt kommt die Struktur:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;doc&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;header <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>HTML5 Layout<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
    <span style="color: #009900;">&lt;nav&gt;</span>
      <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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;active&quot;</span>&gt;&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>Home<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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;&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>Link1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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;&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>Link2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>nav&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span>
  <span style="color: #009900;">&lt;section <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;article&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Artikel Überschrift<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Lorum ipsum...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>article&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>section&gt;</span>
  <span style="color: #009900;">&lt;aside&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Sidebar<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Lorum ipsum...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>aside&gt;</span>
  <span style="color: #009900;">&lt;footer&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>Impressum<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>footer&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Wie man eindeutig erkennen kann, bekommt die HTML 5 Struktur mehr Symantik. Die einzelnen Elemente wie z.b. Header, Navigation, Sidebar usw. bekommen endlich eigene Tags was auch zu einem schlankerem Code führt. Das eine &#8220;div&#8221; wird verwendet, um dem Layout eine feste Breite zu verschaffen und um alles zu zentrieren.</p>
<p>Damit jetzt alles Form und Farbe bekommt folgt nun das CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* HTML5 HACK -------------------------------------- */</span>  
header<span style="color: #00AA00;">,</span> section<span style="color: #00AA00;">,</span> footer<span style="color: #00AA00;">,</span> aside<span style="color: #00AA00;">,</span> nav<span style="color: #00AA00;">,</span> article <span style="color: #00AA00;">&#123;</span>  
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span>;  
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* LAYOUT ------------------------------------------ */</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span>;
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span>;
  font-<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#444</span>;
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#doc</span>  <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">800px</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 <span style="color: #993333;">auto</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* HEADER &amp; NAVIGATION ------------------------------ */</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">15px</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> h1 <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span> 0;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#A5A5A5</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> nav ul <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span>;
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> nav ul li <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> nav ul li a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">10px</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span>;
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#CC3366</span>;
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#header</span> nav ul li<span style="color: #6666ff;">.active</span> a<span style="color: #00AA00;">,</span>
<span style="color: #cc00cc;">#header</span> nav ul li a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#444</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* CONTENT ------------------------------------------ */</span>
&nbsp;
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">440px</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">15px</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 0 <span style="color: #933;">10px</span> 0;
  <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;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* SIDEBAR ------------------------------------------ */</span>
&nbsp;
aside <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">15px</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 0 <span style="color: #933;">10px</span> 0;
  <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;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* FOOTER ------------------------------------------ */</span>
&nbsp;
footer <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span>;
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#DDD</span>;
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">15px</span>;
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> 0 0 0;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
footer a <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#999</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Am Anfang des CSS Files befindet sich ein kleiner Hack, damit sich die HTML 5 Elemente (header, section, footer, aside usw.) wie ganz normale Block-Level-Elemente verhalten. Wie es auch bei einem &#8220;div&#8221; der Fall ist.<br />
Das komplette Ergebniss aus HTML und CSS kan man <strong><a href="../wp-content/uploads/html5/">hier</a></strong> sehen.</p>
<p>Wie schon oben erwähnt befindet sich HTML 5 noch in der Entwicklung und wird zur Zeit leider in nur wenigen Browsern unterstützt. Für den IE gibts halt wie immer Workarounds. Es ist aber gut das man jetzt schon mit HTML 5 arbeiten kann.</p>
<p>Mehr Informationen gibts hier (english):<br />
<a href="http://dev.w3.org/html5/spec/Overview.html">http://www.w3.org</a><br />
<a href="http://html5doctor.com/">http://html5doctor.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/html-5-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blueprint CSS Framework</title>
		<link>http://www.cssguru.de/blueprint-css-framework/</link>
		<comments>http://www.cssguru.de/blueprint-css-framework/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 17:58:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[blueprint]]></category>
		<category><![CDATA[css framework]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=108</guid>
		<description><![CDATA[Das Blueprint Framework ist vorgefertigtes Gerüst welches einem sehr viel Arbeit abnehmen kann. Es ist ein typografisch angepassten Layout in einem 24 Spalten (Grid) Design mit einer &#8220;Reset.css&#8221; und einem Stylesheet fürs Drucken. Ansonsten findet man noch ein CSS-File für schöne Formulare und noch ein paar Plugins für Buttons, Tabs und Sprites.
Das tolle an Blueprint [...]]]></description>
			<content:encoded><![CDATA[<p>Das Blueprint Framework ist vorgefertigtes Gerüst welches einem sehr viel Arbeit abnehmen kann. Es ist ein typografisch angepassten Layout in einem 24 Spalten (Grid) Design mit einer &#8220;Reset.css&#8221; und einem Stylesheet fürs Drucken. Ansonsten findet man noch ein CSS-File für schöne Formulare und noch ein paar Plugins für Buttons, Tabs und Sprites.<br />
Das tolle an Blueprint ist, dass man in nur wenigen Minuten verschiedene CSS Layouts zusammen bauen kann, welche auf den 24 Grids basieren:<br />
<span id="more-108"></span><br />
<img class="alignnone size-full wp-image-110" title="blueprint_grid" src="http://www.cssguru.de/wp-content/uploads/blueprint_grid.png" alt="blueprint_grid" width="480" height="269" /></p>
<p>Um es zu verwenden muss man zuerst mindestens die Dateien &#8220;screen.css&#8221;, für den Internet Explorer die &#8220;ie.css&#8221; und optional die &#8220;print.css&#8221; in den Header einbinden. Jetzt kann man z.b. ein ganz einfaches Layout wie dieses hier erstellen:</p>
<p><img class="alignnone size-full wp-image-115" title="blueprint_grid_16x8" src="http://www.cssguru.de/wp-content/uploads/blueprint_grid_16x8.png" alt="blueprint_grid_16x8" width="480" height="269" /></p>
<p>Hier das Markup:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict 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;container&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;span-16&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Main Content<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;span-8 last&quot;</span>&gt;</span>
         <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Sidebar<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</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></div></div>

<p>Wie man sehen kann werden die einzelnen Grids mit der CSS-Klasse &#8220;span&#8221; definiert.<br />
Zu beachten ist, dass man der letzten Spalte noch ein &#8220;last&#8221; hinzufügt.</p>
<p>Das obere Beispiel ist natürlich nichts besonderes, will man aber z.b. mehrere Blöcke ineinander verschachteln, merkt man schnell wie hilfreich Blueprint ist.</p>
<p><img class="alignnone size-full wp-image-116" title="blueprint_grid_capsuled" src="http://www.cssguru.de/wp-content/uploads/blueprint_grid_capsuled.png" alt="blueprint_grid_capsuled" width="480" height="269" /></p>
<p>Und hier das HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict 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;container&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;span-16&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Main Content<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</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;span-8&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>InnerA<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</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: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;span-8 last&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>InnerB<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</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>
    <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;span-8 last&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Sidebar<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</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></div></div>

<p>Ich hoffe man kann anhand des kurzen Beispiels sehen wozu ein CSS Framework nützlich sein kann.<br />
Ob man es einsetzen soll oder nicht bleibt jedem selbt überlassen, allerdings muss ich sagen dass es die Arbeit an komplexeren Seiten deutlich erleichtert.</p>
<p>Mehr Informationen gibts hier:<br />
<a href="http://www.blueprintcss.org">http://www.blueprintcss.org</a></p>
<p>Eine Alternative mit einem &#8220;Online-Grid-Baukasten&#8221; findest du hier:<br />
<a href="http://960.gs">http://960.gs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/blueprint-css-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alternative CSS-Datei für den Internet Explorer</title>
		<link>http://www.cssguru.de/alternative-css-datei-fur-den-internet-explorer/</link>
		<comments>http://www.cssguru.de/alternative-css-datei-fur-den-internet-explorer/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 16:55:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[conditional comments]]></category>
		<category><![CDATA[ie hack]]></category>
		<category><![CDATA[target ie]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=57</guid>
		<description><![CDATA[Da der IE in den meisten Fällen HTML Seiten anders als z.b. der Firefox anzeigt, kann man das Problem entweder mit einem Hack, oder mit einer CSS Datei die nur für den IE importiert wird lösen. Diese Methode nennt sich &#8220;conditional comments&#8221; und ermöglicht einen validen CSS Code für alle Browser.

Ein paar Zeilen Code werden [...]]]></description>
			<content:encoded><![CDATA[<p>Da der IE in den meisten Fällen HTML Seiten anders als z.b. der Firefox anzeigt, kann man das Problem entweder mit einem Hack, oder mit einer CSS Datei die nur für den IE importiert wird lösen. Diese Methode nennt sich &#8220;conditional comments&#8221; und ermöglicht einen validen CSS Code für alle Browser.<br />
<span id="more-57"></span><br />
<strong>Ein paar Zeilen Code werden dafür einfach in den &#8220;head&#8221; Bereich eingebunden:</strong></p>
<p>Beispiel für alle Internet Explorer</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

<p>Beispiel nur für den IE6</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE 6]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie6.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

<p>Beispiel nur für den IE7</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE 7]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie7.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

<p>Beispiel nur für den IE7</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE 7]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie7.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

<p>Beispiel nur für alle IE Browser Versionen unter IE7</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if lt IE 7]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

<p>Beispiel für alle IE Browser Versionen die entweder IE7 sind oder dadrunter</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if lte IE 7]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;link rel=&quot;stylesheet&quot; href=&quot;ie.css&quot; type=&quot;text/css&quot; /&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/alternative-css-datei-fur-den-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 CSS Layouts zum downloaden</title>
		<link>http://www.cssguru.de/4-css-layouts-zum-downloaden/</link>
		<comments>http://www.cssguru.de/4-css-layouts-zum-downloaden/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 12:49:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[css vorlage]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=34</guid>
		<description><![CDATA[Layouts mit CSS und XHTML zu bauen ist ja nicht jedermanns Sache, also habe ich mir gedacht ich mach mal einfach ein paar davon.
Hier das Ergebniss zum kostenlosen Download:











]]></description>
			<content:encoded><![CDATA[<p>Layouts mit CSS und XHTML zu bauen ist ja nicht jedermanns Sache, also habe ich mir gedacht ich mach mal einfach ein paar davon.<br />
Hier das Ergebniss zum kostenlosen Download:</p>
<ul class="css-layouts">
<li><a href="http://www.cssguru.de/wp-content/uploads/css-layouts/layout-1.zip"><img src="http://www.cssguru.de/wp-content/uploads/css-layout1.gif" alt="css layout 1" /><br />
</a></li>
<li><a href="http://www.cssguru.de/wp-content/uploads/css-layouts/layout-2.zip"><img src="http://www.cssguru.de/wp-content/uploads/css-layout2.gif" alt="css layout 2" /><br />
</a></li>
<li><a href="http://www.cssguru.de/wp-content/uploads/css-layouts/layout-3.zip"><img src="http://www.cssguru.de/wp-content/uploads/css-layout3.gif" alt="css layout 3" /><br />
</a></li>
<li><a href="http://www.cssguru.de/wp-content/uploads/css-layouts/layout-4.zip"><img src="http://www.cssguru.de/wp-content/uploads/css-layout4.gif" alt="css layout 4" /><br />
</a></li>
</ul>
<div class="segmenter"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/4-css-layouts-zum-downloaden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Flashmessage styling</title>
		<link>http://www.cssguru.de/css-flashmessage-styling/</link>
		<comments>http://www.cssguru.de/css-flashmessage-styling/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 17:44:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[alertmessage]]></category>
		<category><![CDATA[errormessage]]></category>
		<category><![CDATA[flashmessage]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=29</guid>
		<description><![CDATA[Auf fast jeder Seite wird man früher oder später einer grünen Success- oder einer roten Errormessage begegnen. In diesem kurzem Tutorial werde ich erklären wie man eine Flashmessage wie diese hier erstellt:
Hallo, ich bin eine rote Flashmessage!
Hallo, ich bin eine grüne Flashmessage!

Das HTML dafür ist ein einfaches DIV mit einer CSS-Klasse.

&#60;div class=&#34;error_message&#34;&#62;Rote Flashmessage!&#60;/div&#62;
&#160;
&#60;div class=&#34;success_message&#34;&#62;Grüne Flashmessage!&#60;/div&#62;

Im [...]]]></description>
			<content:encoded><![CDATA[<p>Auf fast jeder Seite wird man früher oder später einer grünen Success- oder einer roten Errormessage begegnen. In diesem kurzem Tutorial werde ich erklären wie man eine Flashmessage wie diese hier erstellt:</p>
<div class="error_message">Hallo, ich bin eine rote Flashmessage!</div>
<div class="success_message">Hallo, ich bin eine grüne Flashmessage!</div>
<p><span id="more-29"></span><br />
Das HTML dafür ist ein einfaches DIV mit einer CSS-Klasse.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict 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;error_message&quot;</span>&gt;</span>Rote Flashmessage!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<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;success_message&quot;</span>&gt;</span>Grüne Flashmessage!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Im CSS wird zuerst die Text-, Border- und Backgroundfarbe definiert. Dem &#8220;background&#8221; wird noch ein Hintergrundbild hinzugefügt welches links 8px und oben 4px abstand hat. Dann kommt noch ein innerer &#8220;padding&#8221; und ein äusserer &#8220;margin-bottom&#8221;.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.error_message</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFBABA</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">error_icn.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">8px</span> <span style="color: #933;">4px</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;">#CB2026</span>;
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#CB2026</span>;
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 0 <span style="color: #933;">20px</span> 0;
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">40px</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.success_message</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#DFF2BF</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">success_icn.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">8px</span> <span style="color: #933;">4px</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;">#359545</span>;
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#359545</span>;
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 0 <span style="color: #933;">20px</span> 0;
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">40px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css-flashmessage-styling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Blockqotes</title>
		<link>http://www.cssguru.de/css-blockqotes/</link>
		<comments>http://www.cssguru.de/css-blockqotes/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 20:29:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[anführungsstriche]]></category>
		<category><![CDATA[anführungszeichen]]></category>
		<category><![CDATA[blockquotes]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=26</guid>
		<description><![CDATA[Heute werde ich mal ein kurzes Tutorial über das Styling von blockquotes erstellen.
Im großen und ganzen wird das Ergebniss letzendlich so aussehen:
Der erste Vorschlag für Cascading Style Sheets kam 1993 auf, mehrere weitere folgten bis 1995.

Das HTML hierfür sieht ganz einfach aus:

&#60;blockquote&#62;
  &#60;em&#62;Der erste Vorschlag für Cascading Style Sheets kam 1993 auf, mehrere weitere [...]]]></description>
			<content:encoded><![CDATA[<p>Heute werde ich mal ein kurzes Tutorial über das Styling von blockquotes erstellen.<br />
Im großen und ganzen wird das Ergebniss letzendlich so aussehen:</p>
<blockquote class="bq_example"><p><em>Der erste Vorschlag für Cascading Style Sheets kam 1993 auf, mehrere weitere folgten bis 1995.</em></p></blockquote>
<p><span id="more-26"></span></p>
<p>Das HTML hierfür sieht ganz einfach aus:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">blockquote</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">em</span>&gt;</span>Der erste Vorschlag für Cascading Style Sheets kam 1993 auf, mehrere weitere folgten bis 1995.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">em</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">blockquote</span>&gt;</span></pre></div></div>

<p>Gefolgt vom CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">blockquote <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/blockquote_left.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span>;
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">15px</span>;
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 0 0 <span style="color: #933;">40px</span>;
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#999</span>;
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">140</span>%</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote em <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">30px</span> 0 0;
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/blockquote_right.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">right</span>;
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span>;	
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Das &#8220;blockquote&#8221; Tag hat die linke Hintergrundgrafik, welche oben links ausgerichtet wird. Das &#8220;em&#8221; Tag die rechte. Dazu noch bischen padding damit der Text die Hintergrundgrafik nicht verdeckt.</p>
<p>P.S. Hab noch keine zeit gehabt es unter IE zu testen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css-blockqotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Tabellen</title>
		<link>http://www.cssguru.de/css-tabellen/</link>
		<comments>http://www.cssguru.de/css-tabellen/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 18:04:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css tabellen]]></category>
		<category><![CDATA[css tables]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=24</guid>
		<description><![CDATA[Die Zeiten wo man noch ein Layout mit Tabellen erstellt hat sind vorbei, was nicht heissen soll dass diese nicht mehr benutzt werden. Sie erfüllen andere, wichtige Zwecke und werden nach wie vor gebraucht. Deshalb beschäftigt sich dieser Artikel mit einer einfache Tabelle, welche mit hilfe von CSS gestylt wird. Das Ergbinss sieht dann so [...]]]></description>
			<content:encoded><![CDATA[<p>Die Zeiten wo man noch ein Layout mit Tabellen erstellt hat sind vorbei, was nicht heissen soll dass diese nicht mehr benutzt werden. Sie erfüllen andere, wichtige Zwecke und werden nach wie vor gebraucht. Deshalb beschäftigt sich dieser Artikel mit einer einfache Tabelle, welche mit hilfe von CSS gestylt wird. Das Ergbinss sieht dann so aus:</p>
<table id="simple-table" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td>Konsole:</td>
<td>XBOX 360</td>
<td>Playstation 3</td>
<td>WII</td>
</tr>
</thead>
<tbody>
<tr>
<td><strong>CPU:</strong></td>
<td>3 x Power PC Kerne</td>
<td>Cell Prozessor</td>
<td>IBM Power PC</td>
</tr>
<tr class="grey">
<td><strong>Grafik:</strong></td>
<td>ATI GPU</td>
<td>Nvidia GPU</td>
<td>ATI GPU</td>
</tr>
<tr>
<td><strong>Speicher:</strong></td>
<td>512 MB GDDR3</td>
<td>256 MB XDR</td>
<td>24 MB + 64 MB extern</td>
</tr>
<tr class="grey">
<td><strong>Preis:</strong></td>
<td>249,- Euro</td>
<td>399,- Euro</td>
<td>249,- Euro</td>
</tr>
</tbody>
</table>
<p><span id="more-24"></span><br />
Tabellen werden erst seit CSS2 gesondert behandelt und haben eigene CSS-Eigenschaften. Dennoch gibt es auch eine Menge Eigenschaften von CSS1, die sich auf Tabellen, Spalten und Zeilen anwenden lassen. Im meinem HTML werde ich die Tabelle in zwei Segmente teilen: einmal den Tabellenkopf (thead) und den Tabellenbody (tbody). Es gibt noch den Tabellenfooter (tfoot), allerdings lasse ich ihn aus, da er meiner Meinung nach in dieser Struktur keinen Sinn macht. Und so sieht dann das HTML aus:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;simple-table&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Konsole:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>XBOX 360<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Playstation 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>WII<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">thead</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>CPU:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>3 x Power PC Kerne<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Cell Prozessor<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>IBM Power PC<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;grey&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Grafik:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>ATI GPU<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Nvidia GPU<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>ATI GPU<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Speicher:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>512 MB GDDR3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>256 MB XDR<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>24 MB + 64 MB extern<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;grey&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Preis:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>249,- Euro<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>399,- Euro<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>249,- Euro<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tbody</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span></pre></div></div>

<p>Im CSS kann ich dann direkt die &#8220;thead&#8221; ansprechen und so eine andere Hintergrundfarbe zuweisen.<br />
Die CSS-Klasse &#8220;grey&#8221; benutze ich um jede zweite Zeile mit dem leichtem Grau zu hinterlegen, um es so besser lesbar zu machen:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #cc00cc;">#simple-table</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 0 <span style="color: #933;">10px</span> 0;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0;
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#simple-table</span> td <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span>;
  <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#C0C0C0</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#simple-table</span> thead td <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span>;  
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#simple-table</span> tbody tr<span style="color: #6666ff;">.grey</span> td <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#EEE</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Das war&#8217;s auch <img src='http://www.cssguru.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css-tabellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Sprites</title>
		<link>http://www.cssguru.de/css-sprites/</link>
		<comments>http://www.cssguru.de/css-sprites/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 16:35:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[performance optimierung]]></category>

		<guid isPermaLink="false">http://www.cssguru.de/?p=22</guid>
		<description><![CDATA[Die CSS Sprites Technik ist keine Neuerfindung, da es schon zu den alten &#8220;Super Mario Brothers Nintendo Zeiten&#8221; verwendet wurde. Grössere Webseiten nutzen die Technik um die Ladezeiten zu verringern. Wenn man z.b. Tonnen von JavaScript für Werbung, Tracking und andere Sachen laden muss, versucht man an jeder Ecke zu optimieren. Auch wenn die Ladezeiten [...]]]></description>
			<content:encoded><![CDATA[<p>Die CSS Sprites Technik ist keine Neuerfindung, da es schon zu den alten &#8220;Super Mario Brothers Nintendo Zeiten&#8221; verwendet wurde. Grössere Webseiten nutzen die Technik um die Ladezeiten zu verringern. Wenn man z.b. Tonnen von JavaScript für Werbung, Tracking und andere Sachen laden muss, versucht man an jeder Ecke zu optimieren.<span id="more-22"></span> Auch wenn die Ladezeiten nur milisekunden dauern summiert es sich wenn eine Seite ca. 30 Bilder laden muss. Genau da kommen die Sprites zum Einsatz. Es wird versucht auf einer Datei möglichst viele Grafiken unterzubringen und diese danach per CSS zu positionieren ohne das der Anwender etwas davon mitkriegt.</p>
<p>In diesem Artikel werde ich diese unten abgebildete Yahoo-Buttons-Navigation nachbauen und somit versuche die Technik zu erklären:</p>
<p><a href='http://www.cssguru.de/wp-content/uploads/yahoo_example.jpg'><img src="http://www.cssguru.de/wp-content/uploads/yahoo_example.jpg" alt="" title="yahoo sprite example" width="350" height="118" class="aligncenter size-full" /></a></p>
<p style="clear: both;">Hierfür werde ich diese eine Grafik verwenden.</p>
<p><img src="http://www.cssguru.de/wp-content/themes/cssguru/images/sprite_example.jpg" alt="" title="sprite example"  class="alignnone size-full" /></p>
<p style="clear: both;">
Und jetzt erstmal das HTML. Es wird eine einfache ungeordnete Liste mit 5 Unterpunkten erstellt. Jedes LI Element erhält eine eigene Klasse um nachhher per CSS die Positionierung der entsprechenden Grafik zuordnen zu können.
</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;simple-sprite&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mail&quot;</span>&gt;&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>Mail<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;messanger&quot;</span>&gt;&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>Messanger<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;radio&quot;</span>&gt;&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>Radio<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wetter&quot;</span>&gt;&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>Wetter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;lokales&quot;</span>&gt;&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>Lokales<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;horoskop&quot;</span>&gt;&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>Horoskop<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&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></div></div>

<p>Gefolgt vom CSS, im welchem ich zuerst die Liste style.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#simple-sprite</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</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: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">370px</span>;
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Verdana <span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span>;
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span>;
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span>;
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> 0;
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">115px</span>;
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">35px</span>;
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</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: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> 0 <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> 0;
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFF</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;">#B9C0C6</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Jetzt bekommt die Klasse &#8220;<code>ul#simple-sprite li a</code>&#8221; das Sprite als Hintergrund, um es danach mit &#8220;background-position&#8221; den einzelnen Buttons zuzurodnen:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#simple-sprite</span> li a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span>;
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#193777</span>;
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/sprite_example.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span>; <span style="color: #808080; font-style: italic;">/* Sprite */</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">35px</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Und hier die einzelnen Buttons */</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.mail</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span>; 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.messanger</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">-45px</span>; 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.radio</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">-95px</span>;	 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.wetter</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">-145px</span>; 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.lokales</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">-195px</span>;	 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul<span style="color: #cc00cc;">#simple-sprite</span> li<span style="color: #6666ff;">.horoskop</span> a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">-248px</span>; 
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Und fertig: </p>
<ul id="simple-sprite">
<li class="mail"><a href="#">Mail</a></li>
<li class="messanger"><a href="#">Messanger</a></li>
<li class="radio"><a href="#">Radio</a></li>
<li class="wetter"><a href="#">Wetter</a></li>
<li class="lokales"><a href="#">Lokales</a></li>
<li class="horoskop"><a href="#">Horoskop</a></li>
</ul>
<div class="segmenter"></div>
<p><strong>Interessante Links zum Thema Sprites:</strong><br />
<a href="http://www.drweb.de/magazin/css-sprites-quellensammlung/">CSS Sprites Quellensammlung (Dr.Web)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssguru.de/css-sprites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
