<?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"
	>

<channel>
	<title>Csslabs</title>
	<atom:link href="http://csslabs.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://csslabs.be</link>
	<description>Alles over CSS en XHTML</description>
	<pubDate>Fri, 02 Jul 2010 10:14:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Ontwerp een 404 pagina met CSS</title>
		<link>http://csslabs.be/css/ontwerp-een-404-pagina-met-css/</link>
		<comments>http://csslabs.be/css/ontwerp-een-404-pagina-met-css/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 23:06:21 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://csslabs.be/?p=20</guid>
		<description><![CDATA[Een 404 pagina zou je normaal gezien nooit mogen tegenkomen. Als je toch op zo&#8217;n pagina terecht komt, is het natuurlijk leuker als je een mooie en duidelijke pagina ziet, dan een lelijke standaard 404 pagina. In dit artikel zal ik jullie tonen hoe je met CSS een mooie 404 pagina kan maken. Hier zie [...]]]></description>
			<content:encoded><![CDATA[<p>Een 404 pagina zou je normaal gezien nooit mogen tegenkomen. Als je toch op zo&#8217;n pagina terecht komt, is het natuurlijk leuker als je een mooie en duidelijke pagina ziet, dan een lelijke standaard 404 pagina. In dit artikel zal ik jullie tonen hoe je met CSS een <strong>mooie 404 pagina</strong> kan maken. <a href="http://csslabs.be/labs/Ontwerp een 404 pagina met CSS/" target="_blank">Hier</a> zie je het voorbeeld van wat wij zullen maken.<span id="more-20"></span></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;">h1</span>&gt;</span>404 - Pagina niet gevonden<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>De pagina die u probeerde te bezoeken bestaat niet of heeft nooit bestaan. Waarschijnlijk hebt u de URL verkeerd ingevoerd of u hebt op een dode link geklikt. U kan nu gewoon terug gaan naar de <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;http://csslabs.be&quot;</span>&gt;</span>home pagina<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;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bg&quot;</span>&gt;</span>404<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

<p>In het voorbeeld kan je zien dat de css niet in een apart bestand staat, maar gewoon tussen de head tags. Dit doen we omdat we zeker willen zijn dat die 404 pagina wel voor de volle 100% werkt. De HTML van de pagina zit heel eenvoudig in elkaar, daarom bespreken we alleen de CSS code.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #00AA00;">*</span> <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: #00AA00;">&#125;</span>
body <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span>;
<span style="color: #00AA00;">&#125;</span>
h1 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span> <span style="color: #933;">17px</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span>;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#bf1b05</span>;
<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span>;
<span style="color: #00AA00;">&#125;</span>
p <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span>/<span style="color: #933;">20px</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span>;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#424242</span>;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">340px</span>;
<span style="color: #00AA00;">&#125;</span>
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;">#2273b2</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>
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Deze blok code hierboven is eigenlijk heel eenvoudig. Hij zorgt er gewoon voor dat alles netjes op zijn plaats staat en er goed uitziet. Hieronder begint het echte werk.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">p<span style="color: #6666ff;">.bg</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span>;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f4f4f4</span>;
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span>;
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span>-<span style="color: #cc66cc;">5</span>;
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span>0;
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span>0;
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-140px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>De eerste twee regels zorgen gewoon voor de opmaak. Position absolute zorgt er voor dat we de tekst gemakkelijk kunnen positioneren. <a href="http://csslabs.be/css/werken-met-z-index/">Z-index</a> geven we een negatieve waarde zodat de tekst onder alles staat. Met top nul en left nul zorgen we ervoor dat de tekst links boven komt te staan. Ten slotte gebruiken we margin-top om er voor te zorgen dat de tekst staat zoals we willen. Dit is gewoon even zoeken. Je moet enkele waarden proberen tot het goed staat.</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/ontwerp-een-404-pagina-met-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS voor het printen van pagina’s</title>
		<link>http://csslabs.be/css/css-voor-het-printen-van-pagina%e2%80%99s/</link>
		<comments>http://csslabs.be/css/css-voor-het-printen-van-pagina%e2%80%99s/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 17:04:14 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://csslabs.be/?p=19</guid>
		<description><![CDATA[Voor sommige websites is het best dat je een printvriendelijke versie maakt. Dit is zeer gemakkelijk te realiseren door met HTML een speciaal CSS bestand op te halen. Een CSS bestand waarmee je verschillende onderdelen van je webpagina weghaalt. Je moet er voor zorgen dat je alleen de inhoud overhoud, delen van de layout (menu, [...]]]></description>
			<content:encoded><![CDATA[<p>Voor sommige websites is het best dat je een printvriendelijke versie maakt. Dit is zeer gemakkelijk te realiseren door met HTML een speciaal CSS bestand op te halen. Een CSS bestand waarmee je verschillende onderdelen van je webpagina weghaalt. Je moet er voor zorgen dat je alleen de inhoud overhoud, delen van de layout (menu, sidebar) kunnen weg.<span id="more-19"></span></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;">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;inc/print.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: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;print&quot;</span>&gt;</span></pre></div></div>

<p>Als je de bovenstaande code tussen de head tags van je pagina plaatst, kan je het bestand print.css gebruiken als <em>print stylesheet</em>. Zoals je ziet doen we dat op dezelfde manier zoals we een gewone stylesheet invoegen. Het verschil zit hem in het attribuut <strong>media</strong>. Deze geven we de waarde <strong>print</strong>.</p>
<p>Nu zullen we in de CSS enkele waarden instellen.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">body <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: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</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;">#000</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Eerst zetten we de marges en padding op nul. Daarna halen we de eventuele achtergrond afbeeldingen weg. De achtergrond kleur maken we wit en de tekst zwart. Deze stappen zorgden ervoor dat alles door iedereen uitgeprint kan worden.</p>
<p>Nu moeten we nog een stukken weghalen, stukken die niet afgedrukt moeten worden. In het voorbeeld zullen we de sidebar, de afbeeldingen en de footer weghalen.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #cc00cc;">#sidebar</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#footer</span><span style="color: #00AA00;">,</span> img <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Alles in één bestand</strong></p>
<p>Het is ook mogelijk om je printvriendelijke CSS in je bestaande stylesheet te zetten. Zo hoef je dus geen tweede stylesheet aan te maken. Om dit voor elkaar te krijgen kun je onderstaande code gebruiken.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #a1a100;">@media print{</span>
<span style="color: #808080; font-style: italic;">/* Hier komt je CSS voor het printen */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Hier zet je gewone CSS code */</span></pre></div></div>

<p>Zelf kan je natuurlijk nog veel verder gaan. Probeer eens iets en laat het ons zien.</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/css-voor-het-printen-van-pagina%e2%80%99s/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Csslabs update</title>
		<link>http://csslabs.be/csslabs/csslabs-update/</link>
		<comments>http://csslabs.be/csslabs/csslabs-update/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 14:47:27 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[Csslabs]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=18</guid>
		<description><![CDATA[Zoals je ziet is Csslabs weer veranderd. Als layout heb ik gewoon een eenvoudige Wordpress Theme gekozen. Deze werkt in tegenstelling tot de vorige layout wel in alle browsers. Deze zou ik graag een tijdje gebruiken zodat ik wat meer kan werken aan de inhoud. 
De layout is niet het enige dat veranderd is. Enkele [...]]]></description>
			<content:encoded><![CDATA[<p>Zoals je ziet is Csslabs weer veranderd. Als layout heb ik gewoon een eenvoudige Wordpress Theme gekozen. Deze werkt in tegenstelling tot de vorige layout wel in alle browsers. Deze zou ik graag een tijdje gebruiken zodat ik wat meer kan werken aan de inhoud. <span id="more-18"></span></p>
<p>De layout is niet het enige dat veranderd is. Enkele artikels heb ik volledige opnieuw geschreven of aangepast. Het artikel <a href="http://csslabs.be/css/werken-met-z-index/">Werken met z-index</a> is bijvoorbeeld herschreven, de <a href="http://csslabs.be/css/css-tooltips/">Css tooltips</a> heb ik verbeterd&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/csslabs/csslabs-update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Css image hover menu</title>
		<link>http://csslabs.be/css/css-image-hover-menu/</link>
		<comments>http://csslabs.be/css/css-image-hover-menu/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 22:42:27 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Csslabs]]></category>

		<category><![CDATA[Design]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[XHTML]]></category>

		<category><![CDATA[Menu]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=17</guid>
		<description><![CDATA[Iets wat vele mensen willen bereiken maar wat bijna nooit helemaal lukt, is een image hover menu maken. Als dit dan lukt komt er meestal javascript bij te pas, terwijl het eigenlijk zeer eenvoudig te realiseren is met css. Om te beginnen kan je het voorbeeld hier bekijken. Hier kan je de psd file van [...]]]></description>
			<content:encoded><![CDATA[<p>Iets wat vele mensen willen bereiken maar wat bijna nooit helemaal lukt, is een image hover menu maken. Als dit dan lukt komt er meestal javascript bij te pas, terwijl het eigenlijk zeer eenvoudig te realiseren is met css. Om te beginnen kan je het voorbeeld <a href="http://csslabs.be/labs/Css%20image%20hover%20menu/" target="_blank">hier</a> bekijken. <a title="buttons download" href="http://csslabs.be/labs/Css image hover menu/buttons.zip" target="_blank">Hier</a> kan je de psd file van de buttons downloaden.<span id="more-17"></span></p>
<p><strong>1. De html</strong></p>
<p>Bij dit voorbeeld nemen we een div genaamd &#8216;menu&#8217; met daarin 2 links. Alles staat ook nog eens in een unordered list. De rest zie je hieronder.</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;menu&quot;</span>&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;home&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;http://csslabs.be&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> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;contact&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;http://csslabs.be/contact/&quot;</span>&gt;</span>contact<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><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p><strong>2. De css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> ul <span style="color: #00AA00;">&#123;</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: #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;
<span style="color: #6666ff;">.menu</span> ul li <span style="color: #00AA00;">&#123;</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;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.menu</span> ul li a <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span><span style="color: #933;">-9000px</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;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">82px</span>;
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">27px</span>;
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span>; <span style="color: #808080; font-style: italic;">/* kleine ruimte tussen buttons */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Het stukje code van &#8216;menu ul&#8217; spreekt voor zich. Float:left zorgt ervoor dat het menu horizontaal is. Als je dit weglaat staat alles gewoon onder elkaar. Text-indent:-9000px laat de tekst verdwijnen, ergens heel ver weg.</p>
<p>Nu zullen we de afbeeldingen als achtergrond instellen. De button en de hover-button zitten samen in één afbeelding. Dit ziet er dus als volgt uit.</p>
<p><img class="alignleft size-full wp-image-22" title="home" src="http://csslabs.be/wordpress/wp-content/uploads/2008/07/home.gif" alt="" width="82" height="54" style="margin-bottom:20px;" /></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> ul li<span style="color: #6666ff;">.home</span> a <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/home.gif</span><span style="color: #00AA00;">&#41;</span>;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.menu</span> ul li<span style="color: #6666ff;">.home</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">bottom</span>;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.menu</span> ul li<span style="color: #6666ff;">.contact</span> a <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/contact.gif</span><span style="color: #00AA00;">&#41;</span>;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.menu</span> ul li<span style="color: #6666ff;">.contact</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">bottom</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We stellen telkens de achtergrondafbeelding in. Dan zorgen we ervoor, als je over de link gaat, dat de achtergrondafbeelding veranderd van plaats. Dus de onderkant van het plaatje, met de hover button, wordt zichtbaar.</p>
<p>Nu heb je een image hover menu <strong>zonder javascript</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/css-image-hover-menu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Css tooltips</title>
		<link>http://csslabs.be/css/css-tooltips/</link>
		<comments>http://csslabs.be/css/css-tooltips/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 19:44:15 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=16</guid>
		<description><![CDATA[Tooltips, wie kent ze tegenwoordig niet. Je gaat over een link, en er komt een kadertje tevoorschijn met wat info erin. Meestal zijn ze met javascript gemaakt, maar wij zullen het doen met css. Hier kan je zien wat we willen bereiken. De html is heel eenvoudig opgebouwd. Gewoon een link met daarin een span [...]]]></description>
			<content:encoded><![CDATA[<p>Tooltips, wie kent ze tegenwoordig niet. Je gaat over een link, en er komt een kadertje tevoorschijn met wat info erin. Meestal zijn ze met javascript gemaakt, maar wij zullen het doen met css. <a href="http://csslabs.be/labs/Css tooltips/">Hier</a> kan je zien wat we willen bereiken. De html is heel eenvoudig opgebouwd. Gewoon een link met daarin een span element.<span id="more-16"></span></p>
<p><strong>1. De html</strong></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;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tooltip&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>blog voor en door webmasters<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>csslabs<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p><strong>2. De css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">a<span style="color: #6666ff;">.tooltip</span> <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;">&#125;</span></pre></div></div>

<p>Dit stukje code is heel belangrijk. Het zorgt ervoor dat de <strong>tooltip</strong> op de juiste plaats komt, bij de link dus.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">a<span style="color: #3333ff;">:hover</span><span style="color: #6666ff;">.tooltip</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span>0;
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">10</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Als je wil dat het werkt in IE6, moet padding er staan. Padding mag ook een andere waarde hebben in plaats van 0. <a title="z-index" href="http://csslabs.be/css/werken-met-z-index/" target="_self">Z-index</a> zorgt ervoor dat de tooltip boven alles komt te staan.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">a span<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Hiermee wordt de tooltip verborgen wanneer het nodig is.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">a<span style="color: #3333ff;">:hover </span>span <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</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;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span>;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">110px</span>;
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">10</span>;
<span style="color: #808080; font-style: italic;">/* pure opmaak vanaf hier */</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFDF</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;">#FCF05C</span>;
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333333</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;">3px</span>;
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">11px</span> tahoma<span style="color: #00AA00;">,</span> Verdana<span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</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></pre></div></div>

<p>Eerst wordt de tooltip (span) absoluut gepositioneerd. Zo kunnen we hem goed plaatsen met top en left. Display block zorgt er voor dat de tooltip weer zichtbaar wordt en <a title="z-index" href="http://csslabs.be/css/werken-met-z-index/" target="_self">z-index</a> zorgt er opnieuw voor dat de tooltip boven alles komt te staan. De opmaak is belangrijk om je tooltip duidelijk leesbaar te maken.</p>
<p>Klaar, en dit allemaal zonder javascript!</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/css-tooltips/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Werken met z-index</title>
		<link>http://csslabs.be/css/werken-met-z-index/</link>
		<comments>http://csslabs.be/css/werken-met-z-index/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 10:42:07 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Positioneren]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=15</guid>
		<description><![CDATA[Z-index is een handige functie in css waarmee je elementen kunt stapelen. Je kunt dus met verschillende lagen werken (zoals in photoshop met layers). Z-index moet een getal als waarde hebben. Dit getal mag positief zijn, maar ook negatief. Hoe hoger het getal, hoe hoger de laag ligt. Hoe lager het getal, hoe lager hij [...]]]></description>
			<content:encoded><![CDATA[<p>Z-index is een handige functie in css waarmee je elementen kunt stapelen. Je kunt dus met verschillende lagen werken (zoals in photoshop met layers). Z-index moet een getal als waarde hebben. Dit getal mag positief zijn, maar ook negatief. Hoe hoger het getal, hoe hoger de laag ligt. Hoe lager het getal, hoe lager hij ligt. Klinkt logisch toch? Als er geen waarde is toegewezen heeft hij standaard de waarde 0.<span id="more-15"></span></p>
<p>Je kan z-index op twee verschillende manieren gebruiken. We zullen beginnen met de eerste manier waarbij bijvoorbeeld een div absoluut gepositioneerd word.</p>
<h3>Z-index - absoluut gepositioneerd</h3>
<p>We veronderstellen dat we twee div elementen hebben en we willen ze op elkaar krijgen. We noemen ze layer1 en layer2.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.layer1</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span>;
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span>;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.layer2</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</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: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span>;
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Layer1 heeft z-index 0 (standaard waarde), en layer2 z-index 1. Dus layer2 ligt nu boven op layer1.</p>
<p><strong>Een extra tip</strong><br />
Als je een element absoluut gepositioneerd hebt staat die altijd in de linker bovenhoek van de pagina. Als je dit wil voorkomen moet je hem in een aparte div zetten die relatief gepositioneerd is. Dan zal hij zeker binnen die div blijven.</p>
<h3>Z-index - relatief gepositioneerd</h3>
<p>Nu zullen we twee div elementen stapelen door één van de twee relatief te positioneren. Om te beginnen zetten we gewoon twee div&#8217;s onder elkaar. Layer2 wordt relatief gepositioneerd en we geven hem als z-index waarde 1.</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;layer1&quot;</span>&gt;&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;layer2&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.layer1</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;">100px</span>;
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.layer2</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;">100px</span>;
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span>;
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</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;">&#125;</span></pre></div></div>

<p>Als je dit geprobeerd hebt zie je dat ze nog altijd onder elkaar staan. Dit komt omdat we layer2 nog moeten vertellen waar hij moet staan. We zullen hem boven layer1 zetten d.m.v. een negatieve top waarde. We trekken hem dus als het ware naar boven.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.layer2</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;">100px</span>;
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span>;
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span>;
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-50px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We zien dus dat je met z-index veel kan bereiken. Als je werkt met relatief gepositioneerde elementen kan je een element plaatsen ten opzichte van zijn oorspronkelijke plaats. Met absoluut gepositioneerde elementen kan je ze plaatsen ten opzichte van de pagina of een div (die relatief gepositioneerd is).</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/werken-met-z-index/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Favicon maken</title>
		<link>http://csslabs.be/xhtml/favicon-maken/</link>
		<comments>http://csslabs.be/xhtml/favicon-maken/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 22:14:09 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=14</guid>
		<description><![CDATA[Als je je site wil laten opvallen tussen andere sites, moet je een favicon hebben. Dit is echter niet altijd zo gemakkelijk. Daarom post ik hier een paar links om zo&#8217;n favicon te kunnen maken. Bij de eerste site moet je je afbeelding (best vierkant) gewoon uploaden. Deze wordt dan omgezet naar een ico bestand. [...]]]></description>
			<content:encoded><![CDATA[<p>Als je je site wil laten opvallen tussen andere sites, moet je een favicon hebben. Dit is echter niet altijd zo gemakkelijk. Daarom post ik hier een paar links om zo&#8217;n favicon te kunnen maken. Bij <a title="favicon converter" href="http://tools.dynamicdrive.com/favicon/" target="_blank">de eerste site</a> moet je je afbeelding (best vierkant) gewoon uploaden. Deze wordt dan omgezet naar een ico bestand. Als je zelf een favicon wil maken, pixel per pixel, dan kan je dat <a title="favicon editor" href="http://www.degraeve.com/favicon/" target="_blank">hier</a> doen.<span id="more-14"></span></p>
<p>Nu je je favicon gemaakt hebt, moet je het ook nog gebruiken. Dit doe je door de volgende code toe te voegen tussen de <em>head tags</em> van je webpagina.</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;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;favicon.ico&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/xhtml/favicon-maken/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conditional comments</title>
		<link>http://csslabs.be/tips/conditional-comments/</link>
		<comments>http://csslabs.be/tips/conditional-comments/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 22:05:32 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Browsers]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=13</guid>
		<description><![CDATA[Iedereen heeft dit wel al eens meegemaakt, Internet Explorer ondersteund iets niet. Meestal kan je dit wel oplossen door je code wat aan te passen. Als je echt geen oplossing vind of je hebt geen zin om één te zoeken, dan kan je het nog altijd oplossen met conditional comments. Met conditional comments kan je [...]]]></description>
			<content:encoded><![CDATA[<p>Iedereen heeft dit wel al eens meegemaakt, Internet Explorer ondersteund iets niet. Meestal kan je dit wel oplossen door je code wat aan te passen. Als je echt geen oplossing vind of je hebt geen zin om één te zoeken, dan kan je het nog altijd oplossen met <em>conditional comments</em>. Met <em>conditional comments </em>kan je bepaalde stukken code alleen maar laten weergeven in de browser Internet Explorer.<span id="more-13"></span></p>
<p>Zo kan je bijvoorbeeld een extra stylesheet maken voor IE, of een &#8216;uw browser wordt niet ondersteund&#8217; berichtje laten weergeven.</p>
<h5>De code</h5>
<p>De code zit eigenlijk heel eenvoudig in elkaar. Ik zal een voorbeeld geven en dan alle stukjes code uitleggen. Je zult ook zien dat het stuk <strong>if IE</strong> telkens terug komt.</p>
<pre name="code" class="xhtml">&lt;!--[if IE 6]&gt;
Dit wordt alleen weergegeven in Internet Explorer 6
&lt;![endif]--&gt;</pre>
<p>Het begint met &lt;!&#8211; en eindigd met &#8211;&gt;, dat is de structuur van stuk commentaar in je html code. Een normale browser zal dit dus negeren, wat ook de bedoeling is natuurlijk. In het voorbeeld zie je ook een voorwaarde: <em>if IE 6</em> = als Internet Explorer 6. Die voorwaarde kan je aanpassen. In het voorbeeld hieronder wordt het stukje tekst alleen maar weergegeven in Internet Explorer 7.</p>
<pre name="code" class="xhtml">&lt;!--[if IE 7]&gt;
Wordt alleen weergegeven door IE 7
&lt;![endif]--&gt;</pre>
<p>Maar er zijn nog mogelijkheden. Je kan bijvoorbeeld een stukje tekst laten weergeven in browsers die ouder zijn dan IE6, of browsers vanaf IE5. In de volgende voorbeelden zal je zien dat je de voorwaarde nog uitgebreid kan worden.</p>
<pre name="code" class="xhtml">&lt;!--[if lt IE 7]&gt;
Wordt alleen weergegeven door versies lager dan IE7
&lt;![endif]--&gt;</pre>
<pre name="code" class="xhtml">&lt;!--[if gt IE 6]&gt;
Wordt alleen weergegeven door versies hoger dan IE6
&lt;![endif]--&gt;</pre>
<pre name="code" class="xhtml">&lt;!--[if lte IE 6]&gt;
Wordt alleen weergegeven door versies lager dan IE6 en IE6
&lt;![endif]--&gt;</pre>
<pre name="code" class="xhtml">&lt;!--[if gte IE 5]&gt;
Wordt alleen weergegeven door versies hoger dan IE5 en IE5
&lt;![endif]--&gt;</pre>
<p>Even alles op een rijtje:<br />
lt = lager dan<br />
gt = hoger dan<br />
lte = lager dan of gelijk aan<br />
gte = hoger dan of gelijk aan</p>
<p>Wat als je nu wil dat er iets wordt weergegeven in alle browsers uitgezonderd IE. Heel simpel, dan gebruik je gewoon het volgende stukje code.</p>
<pre name="code" class="xhtml">&lt;!--[if !IE]&gt;&lt;!--&gt;
U bent verstandig, u surft niet met Internet Explorer.
&lt;!--&lt;![endif]--&gt;</pre>
<p>Nu is er nog één mogelijkheid. Je kan iets laten weergeven door een specifieke IE-browser en door alle niet-IE browsers. Zo dus.</p>
<pre name="code" class="xhtml">&lt;!--[if IE 7]&gt;&lt;!--&gt;
U gebruikt een niet-IE browser of IE7
&lt;!--&lt;![endif]--&gt;</pre>
<h5>Een laatste tip</h5>
<p>Als je de <em>conditional comments</em> gebruikt om een aparte stylesheet in te laden is er één regel. Eerst je gebruikelijke stylesheet inladen (niet met @-import), en dan pas je aparte stylesheet voor IE.</p>
<p>Gebruik dit alleen maar als het echt nodig is! Het is nog altijd beter als je een stylesheet hebt die in alle browsers zijn werk doet.</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/tips/conditional-comments/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Submit button stylen met CSS</title>
		<link>http://csslabs.be/css/submit-button-stylen-met-css/</link>
		<comments>http://csslabs.be/css/submit-button-stylen-met-css/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 23:11:30 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Formulieren]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=12</guid>
		<description><![CDATA[De standaard submit buttons in een browser zijn meestal niet zo spetterend. Ook zien ze er telkens anders uit. De button in Opera ziet er bijvoorbeeld anders uit dan die van Firefox. In dit artikel zal ik je uitleggen hoe je die button zelf kan stylen, op twee verschillende manieren.
De eerste methode is de meest [...]]]></description>
			<content:encoded><![CDATA[<p>De standaard submit buttons in een browser zijn meestal niet zo spetterend. Ook zien ze er telkens anders uit. De button in Opera ziet er bijvoorbeeld anders uit dan die van Firefox. In dit artikel zal ik je uitleggen hoe je die button zelf kan stylen, op twee verschillende manieren.<span id="more-12"></span></p>
<p>De eerste methode is de meest gekende. We nemen gewoon een inputveld met als type <em>submit</em>. Hieronder zie je de html.</p>
<p><strong>De html</strong></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;">input</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Het type van het input veld hebben we op submit gezet, klinkt logisch. Als value hebben we ook submit genomen, deze tekst komt op de button te staan. Als class nemen we button, zodat we alles kunnen opmaken in ons css bestand.</p>
<p><strong>De css</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">input<span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #933;">11px</span> tahoma<span style="color: #00AA00;">,</span> arial;
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</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;">#F9F9F9</span>;
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#F4F4F4</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>In de css stellen we de hoogte in, het lettertype en we zorgen er voor dat de cursor veranderd naar een handje als je er over gaat. Ook geven we de button een rand van 1 pixel en stellen we de achtergrond kleur in. Dit is maar een voorbeeld, zelf kan je nog veel verder gaan. Je kan bijvoorbeeld een achtergrond afbeelding instellen.</p>
<p>Nu is er ook nog een tweede manier. Deze wordt voornamelijk gebruikt om een afbeelding te gebruiken als button. In de html wordt het duidelijk.</p>
<p><strong>De html</strong></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;">input</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://csslabs.be/wordpress/wp-admin/img/button.png&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;image&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>Zoals je ziet geven we hier al de url naar het plaatje mee, zo moeten we niet meer gaan werken in css.</p>
<p>Dit waren dus de methoden om je submit button te stylen. Probeer zelf wat creatief te zijn en laat ons zien wat je ervan gemaakt hebt.</p>
]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/submit-button-stylen-met-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Css shorthand properties</title>
		<link>http://csslabs.be/css/css-shorthand-properties/</link>
		<comments>http://csslabs.be/css/css-shorthand-properties/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 17:48:02 +0000</pubDate>
		<dc:creator>joren</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Optimalisatie]]></category>

		<guid isPermaLink="false">http://csslabs.be/blog/?p=11</guid>
		<description><![CDATA[Als je met css werkt heb je waarschijnlijk al gemerkt dat het aantal regels code snel kan oplopen. Door middel van css shorthand properties kan je een flink aantal regels schrappen. Werken met shorthand properties heeft meer voordelen dan alleen maar het aantal regels code beperken, het is ook een stuk overzichtelijker en je pagina&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Als je met css werkt heb je waarschijnlijk al gemerkt dat het aantal regels code snel kan oplopen. Door middel van css shorthand properties kan je een flink aantal regels schrappen. Werken met shorthand properties heeft meer voordelen dan alleen maar het aantal regels code beperken, het is ook een stuk overzichtelijker en je pagina&#8217;s laden nog sneller. We zullen eerst eens beginnen met een voorbeeld waarbij je een stuk tekst opmaakt. <span id="more-11"></span></p>
<p><strong>1. Font</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">p <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Georgia</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">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-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">italic</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;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Dit kan je beter zo doen. Let op, volgorde is belangrijk.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">p <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font</span><span style="color: #3333ff;">:<span style="color: #993333;">italic</span> </span>bold <span style="color: #933;">12px</span>/<span style="color: #933;">18px</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>2. Margin &amp; padding</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.container</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span>;
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span>;
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Dit wordt</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.container</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">20px</span> <span style="color: #933;">30px</span> <span style="color: #933;">40px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>De volgorde van de properties kan je gemakkelijk onthouden door middel van een klok. Je begint bovenaan en gaat met de wijzers mee. Zo gaat het ook met padding. Eerst top, dan right, dan bottom en tenslotte left. Deze regels gelden ook voor &#8216;padding&#8217;.</p>
<p>Als je de 3de (bottom) en 4de (left) waarde niet opgeeft, wordt er verondersteld dat de 3de waarde gelijk is aan de 1ste (top), en dat de 4de waarde gelijk is aan de 2de (right).</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.sidebar</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span>;
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span>;
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Dit kan dus worden herschreven als</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.sidebar</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">20px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Of dit</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.sidebar</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span>;
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">50px</span>;
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Kan worden herschreven als</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.sidebar</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">20px</span> <span style="color: #933;">50px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>3. Background</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">body <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;">background-image</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/bg.png</span><span style="color: #00AA00;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #3333ff;">:repeat-</span>x;
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">top</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>wordt</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">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: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/bg.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span> <span style="color: #000000; font-weight: bold;">top</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Als je één van de properties niet gebruikt laat je hem gewoon weg uit de shorthand propertie.</p>
<p><strong>4. Border</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border-top-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span>;
<span style="color: #000000; font-weight: bold;">border-top-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span>;
<span style="color: #000000; font-weight: bold;">border-top-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>wordt</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>dit kan dan weer worden veranderd naar</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> <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;">#000</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>5. List-style</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> 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;">square</span>;
<span style="color: #000000; font-weight: bold;">list-style-position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inside</span>;
<span style="color: #000000; font-weight: bold;">list-style-image</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/list.png</span><span style="color: #00AA00;">&#41;</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>wordt</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> ul <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #3333ff;">:<span style="color: #993333;">square</span> </span>inside <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/list.png</span><span style="color: #00AA00;">&#41;</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>6. Outline</strong></p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">outline-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFO</span>;
<span style="color: #000000; font-weight: bold;">outline-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">dotted</span>;
<span style="color: #000000; font-weight: bold;">outline-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>wordt</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.menu</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFO</span> <span style="color: #993333;">dotted</span> <span style="color: #933;">2px</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://csslabs.be/css/css-shorthand-properties/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
