<?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>Bernd Artmüller &#187; CSS</title>
	<atom:link href="http://berndartmueller.at/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://berndartmueller.at</link>
	<description>Blog from Bernd Artmüller</description>
	<lastBuildDate>Mon, 07 Mar 2011 18:37:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introduction to CSS Pseudo Selectors</title>
		<link>http://berndartmueller.at/2009/05/15/introduction-to-css-pseudo-selectors/</link>
		<comments>http://berndartmueller.at/2009/05/15/introduction-to-css-pseudo-selectors/#comments</comments>
		<pubDate>Fri, 15 May 2009 13:15:23 +0000</pubDate>
		<dc:creator>Bernd</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Developing]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[:hover]]></category>
		<category><![CDATA[first-child]]></category>
		<category><![CDATA[pseudo elements]]></category>
		<category><![CDATA[pseudo selector]]></category>
		<category><![CDATA[selectors]]></category>

		<guid isPermaLink="false">http://berndartmueller.at/?p=209</guid>
		<description><![CDATA[In this article I'm writing about CSS Pseudo Selectors, which are really useful and also easy to use.]]></description>
			<content:encoded><![CDATA[<h2>Syntax</h2>
<pre class="css">selector:pseudo-class { property:  value }</pre>
<p>CSS Pseudo Selectors can also be used with classes</p>
<pre class="css">Selector.class:pseudo-class { property: value }</pre>
<h2>Common Pseudo Selectors</h2>
<p>We often use pseudo selectors on our websites and they are really important. I am talking about the link states.</p>
<pre class="css">a:link {color:#FF0000} /* unvisited link */
a:visited {color:#00FF00} /* visited link */
a:hover {color:#FF00FF} /* mouse over link */
a:active {color:#0000FF} /* selected link */</pre>
<p>Take care of the right order, otherwise they will not work.<br />
You can also combine the Pseudo-Classes with CSS Classes</p>
<pre class="css">a.red:visited {color:#FF0000}</pre>
<h2>The :first-child Pseudo-Class</h2>
<p>A really useful but most people do not know that it exists, is the :first-child selector. It matches the first child of another element. To make sure, that it is also working in Internet Explorer, a doctype must be declared<br />
In the example below, the selector matches the first &#8220;p&#8221; element and changes the text color to blue.</p>
<pre class="html">

<!--
p:first-child
{
color:blue
}
-->

Blue colored paragraph

Normal styled paragraph</pre>
<p>Now we are going to select every &#8220;i&#8221; element in the first &#8220;p&#8221; element of the document. It is really easy, we only have to write p:first-child i { }</p>
<pre class="html">

<!--
p:first-child i
{
color:blue
}
-->

I am <em>italic</em>. I am <em>italic</em>

I am <em>italic</em>. I am <em>italic</em></pre>
<p>In this example, the selector mathes the first &#8220;i&#8221; element in every &#8220;p&#8221; element.</p>
<pre class="html">

<!--
p > i:first-child
{
font-weight:bold
}
-->

I am <em>bold</em>. I am <em>bold</em>

I am <em>bold</em>. I am <em>bold</em></pre>
<p>That&#8217;s it. In the next article I&#8217;ll write about Pseudo elements in CSS, like :first-letter.</p>
]]></content:encoded>
			<wfw:commentRss>http://berndartmueller.at/2009/05/15/introduction-to-css-pseudo-selectors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

