<?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>Webdevtuts &#187; current</title>
	<atom:link href="http://www.webdevtuts.net/tag/current/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevtuts.net</link>
	<description>Making tutorials fun and easy!</description>
	<lastBuildDate>Mon, 06 Sep 2010 17:54:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Highlight Current Page in an HTML Document Using Css</title>
		<link>http://www.webdevtuts.net/coding/css/highlight-current-page-in-an-html-document-using-css/</link>
		<comments>http://www.webdevtuts.net/coding/css/highlight-current-page-in-an-html-document-using-css/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 00:01:57 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[current]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.webdevtuts.net/?p=735</guid>
		<description><![CDATA[When designing a web page using HTML/CSS you might have notice that you cannot have an active page just by creating a new index file.]]></description>
			<content:encoded><![CDATA[<p>When designing a web page using HTML/CSS you might have notice that you cannot have an active page just by creating a new index file. In this tutorial I will teach you the simple steps to creating an active CSS state. Open your favorite WYSIWYG (Dreamweaver, coda, notepad++) editor. </p>
<h3 align="center"><a href="http://www.demo.webdevtuts.net/cssactive/" target="_blank">Click here for Demo</a></h3>
<p>Getting an active state when using css can be very frustrating if you&#8217;re not that familiar with css. Many developers that are new to css often think it is the end of the world when really the active state can be accomplish with very little code. </p>
<h2>The Body</h2>
<p>The body is of the most important roles when you&#8217;re trying to create an active page using css. The reason the body tag is very important because when its time to define what page the user is on the body tag will keep that page active. You&#8217;re probably thinking that just body tag can complete that and truth is it can but with a little bit of help from an id or class tag. to give the body a id or class name you would simply do the following.</p>
<pre>
body id="home"
or
body class="home"
</pre>
<p>Everytime you create a new index page make sure you change the body class or id name and you will later know why.</p>
<h2>The HTML</h2>
<p>For the HTML I created/ a basic navigation menu with and unique id name.  Notice every link such as home, about, etc all have different id names. The reason they all have different id names is so we can identify that certain linktag in the css file. </p>
<pre>
&lt;div id=&quot;menu-nav&quot;&gt;
	&lt;ul&gt;
		&lt;li id=&quot;home&quot;&gt;&lt;a href=&quot;index.html&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;about&quot;&gt;&lt;a href=&quot;about.html&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;team&quot;&gt;&lt;a href=&quot;team.html&quot;&gt;Team&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;video&quot;&gt;&lt;a href=&quot;video.html&quot;&gt;Video&lt;/a&gt;&lt;/li&gt;
		&lt;li id=&quot;contact&quot;&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;&lt;!--end menu-nav--&gt;
</pre>
<h2>The CSS</h2>
<p>Ok so you now have and idea of how the menu has to be laid out using html. Now its time to define each id element from the html. If you look at the code below<br />
you will notice that every css tag has the body id, followed by the menu id with the a(active) tag and finished with the css properties. Take a look at css and compare it to the html. </p>
<pre>
body#home #home a,
body#about #about a,
body#team #team a,
body#video #video a,
body#contact #contact a{
	padding:10px;
	background:#FF0000;
	margin-right:5px;
	color:#FFFF00;
	text-decoration:none;
}
</pre>
<p>This was not a tutorial but I truly hope it helped you guys out. I know many people face this problem quite often and do not know what to do. It was a simple, fast, and sweet technique.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdevtuts.net/coding/css/highlight-current-page-in-an-html-document-using-css/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
