<?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>CSS Tutorials and CSS Articles &#187; CSS Pseudo-Classes</title>
	<atom:link href="http://www.cssmaster.co.uk/tag/css-pseudo-classes/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cssmaster.co.uk</link>
	<description>CSS tutorials and articles</description>
	<lastBuildDate>Tue, 02 Feb 2010 01:43:09 +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>CSS Pseudo-Classes</title>
		<link>http://www.cssmaster.co.uk/css-pseudo-classes</link>
		<comments>http://www.cssmaster.co.uk/css-pseudo-classes#comments</comments>
		<pubDate>Tue, 02 Feb 2010 01:43:09 +0000</pubDate>
		<dc:creator>CSS Master</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>
		<category><![CDATA[CSS Pseudo-Classes]]></category>
		<category><![CDATA[CSS Selectors]]></category>

		<guid isPermaLink="false">http://www.cssmaster.co.uk/?p=92</guid>
		<description><![CDATA[Some CSS selectors allow use to use what are called CSS pseudo-classes in order to add some special effects.  Probably the best example of this is the anchor tag and it&#8217;s hover features.
Anchor tag&#8217;s behaviours can be manipulated by using pseudo-classes.  Let&#8217;s say we want a link to go bold when we hover [...]]]></description>
			<content:encoded><![CDATA[<p>Some CSS selectors allow use to use what are called <strong>CSS pseudo-classes</strong> in order to add some special effects.  Probably the best example of this is the anchor tag and it&#8217;s hover features.</p>
<p>Anchor tag&#8217;s behaviours can be manipulated by using pseudo-classes.  Let&#8217;s say we want a link to go bold when we hover over it, we can use the pseudo class to do this.  Look at the syntax:<br />
<code>selector:pseudo{ foo:bar; }</code></p>
<p>Now let&#8217;s do our bold hover example.  I&#8217;ll also pop in the original anchor declaration:<br />
<code>a { color:red; }<br />
a:hover { font-weight:bold; }</code><br />
When the user hovers their mouse over the anchor it will appear bolded.  I&#8217;ve done this on the link below:</p>
<style type="text/css">a.red:hover { font-weight:bold; }</style>
<p><a href="#" class="red">Example.</a></p>
<p>Easy.</p>
<p>Other pseudo classes for anchor text include:</p>
<ul>
<li>link</li>
<li>visited</li>
<li>hover</li>
<li>active</li>
</ul>
<p>All of these refer to the state and behaviour of the anchor itself.  It&#8217;s pretty self-explanatory what each is for.</p>
<p>It is also possible to use a class on your pseudo-classes:<br />
<code>a.red:hover { font-weight:bold; }</code><br />
You can then use <code>class="red"</code> to all the class.</p>
<p>Another useful pseudo-element is the <code>first-child</code> pseudo-class.  This allows you to add a style to an element that is the first child of another element.  This is handy for styling the first list element out of an (un)ordered list.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssmaster.co.uk/css-pseudo-classes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

