<?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>Shawn Plep &#187; CSS</title>
	<atom:link href="http://shawnplep.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://shawnplep.com</link>
	<description>Shawn Plep is a web programmer, SEO, and hacker from New Orleans, Louisiana.</description>
	<lastBuildDate>Wed, 07 Jul 2010 18:22:45 +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>Use CSS to Show the Current Nav Point</title>
		<link>http://shawnplep.com/css/use-css-to-show-the-current-nav-point/</link>
		<comments>http://shawnplep.com/css/use-css-to-show-the-current-nav-point/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 02:10:20 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://shawnplep.com/?p=37</guid>
		<description><![CDATA[Here's a quick but useful CSS technique. Learn it, and love it - this technique will let you do with CSS what other people have to do with a scripting language.  ]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick but useful CSS technique. Learn it, and love it &#8211; this technique will let you do with <em><strong>CSS</strong></em> what other people have to do with a scripting language.  (Remember: the less scripts you run on a page, the faster your site will load. Make the computer do less.)</p>
<p>First, let&#8217;s start with some example nav code:</p>
<pre class="brush: xml;">
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;home&quot; href=&quot;/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;about&quot; href=&quot;/about/&quot;&gt;About us&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;contact&quot; href=&quot;/contact/&quot;&gt;Contact us&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>The important thing to note is that each nav item has it&#8217;s own distinct <strong>class</strong>. After you&#8217;ve given each nav item a class, move on to your body tag.</p>
<p>For the body tag on each page, give it an id that matches the class name you gave that page in the nav. (So, the body tag for &#8220;About Us&#8221; would have an id of &#8220;about&#8221; and so on.)</p>
<p>Last, make a CSS rule to make the magic happen&#8230;</p>
<pre class="brush: css;">
&lt;code&gt;#home .home, #about .about, #about .about, #contact .contact
 {
 text-decoration: underline;
 }
</pre>
<p>Obviously, you would make the CSS rule do whatever it is you actually need to happen &#8211; but hopefully you get the idea. When the nav class and the body id coincide for any item, that rule takes effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://shawnplep.com/css/use-css-to-show-the-current-nav-point/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
